<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
tlapack::traits::CreateFunctor< matrix_t, class > Struct Template Reference

Functor for data creation. More...

#include <arrayTraits.hpp>

Public Member Functions

template<class T , class idx_t >
constexpr auto operator() (std::vector< T > &v, idx_t m, idx_t n=1) const
 Creates a m-by-n matrix with entries of type T.
 
template<class T , class idx_t >
constexpr auto operator() (std::vector< T > &v, idx_t n) const
 Creates a vector of size n with entries of type T.
 

Detailed Description

template<class matrix_t, class = int>
struct tlapack::traits::CreateFunctor< matrix_t, class >

Functor for data creation.

This is a boilerplate. It must be specialized for each class. See tlapack::Create for examples of usage.

Template Parameters
matrix_tData structure.
classIf this is not an int, then the trait is not defined.

Member Function Documentation

◆ operator()() [1/2]

template<class matrix_t , class = int>
template<class T , class idx_t >
constexpr auto tlapack::traits::CreateFunctor< matrix_t, class >::operator() ( std::vector< T > &  v,
idx_t  m,
idx_t  n = 1 
) const
inlineconstexpr

Creates a m-by-n matrix with entries of type T.

Parameters
[in,out]vOn entry, empty vector with size 0. On exit, vector that may contain allocated memory.
[in]mNumber of rows of the new matrix
[in]nNumber of columns of the new matrix
Returns
The new m-by-n matrix

◆ operator()() [2/2]

template<class matrix_t , class = int>
template<class T , class idx_t >
constexpr auto tlapack::traits::CreateFunctor< matrix_t, class >::operator() ( std::vector< T > &  v,
idx_t  n 
) const
inlineconstexpr

Creates a vector of size n with entries of type T.

Parameters
[out]vOn entry, empty vector with size 0. On exit, vector that may contain allocated memory.
[in]nSize of the new vector
Returns
The new vector of size n

The documentation for this struct was generated from the following file: