MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
convert.hpp File Reference
#include <cassert>
#include <cstddef>
#include <mtl/concepts/vector.hpp>
#include <mtl/concepts/matrix.hpp>
#include <mtl/vec/dense_vector.hpp>
#include <mtl/mat/dense2D.hpp>

Namespaces

namespace  mtl

Functions

template<Vector VSrc, Vector VDst>
void mtl::convert (const VSrc &src, VDst &dst)
 Convert a vector into a pre-allocated destination of (possibly) another type.
template<Matrix MSrc, Matrix MDst>
void mtl::convert (const MSrc &src, MDst &dst)
 Convert a matrix into a pre-allocated destination of (possibly) another type.
template<typename DstValue, Vector VSrc>
vec::dense_vector< DstValue > mtl::convert (const VSrc &src)
 Convert a vector to a new dense_vector<DstValue> (out-of-place convenience).
template<typename DstValue, Matrix MSrc>
mat::dense2D< DstValue > mtl::convert (const MSrc &src)
 Convert a matrix to a new dense2D<DstValue> (out-of-place convenience).