<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
arrayTraits.hpp File Reference
Include dependency graph for arrayTraits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tlapack::traits::CreateFunctor< matrix_t, class >
 Functor for data creation. More...
 
struct  tlapack::traits::CreateStaticFunctor< matrix_t, m, n, class >
 Functor for data creation with static size. More...
 
struct  tlapack::traits::entry_type_trait< T, class >
 Entry type trait. More...
 
struct  tlapack::traits::layout_trait< array_t, class >
 Trait to determine the layout of a given data structure. More...
 
struct  tlapack::traits::matrix_type_traits< matrix_t, int >
 
struct  tlapack::traits::matrix_type_traits< matrixA_t, matrixB_t, matrix_t... >
 
struct  tlapack::traits::size_type_trait< T, class >
 Size type trait. More...
 
struct  tlapack::traits::vector_type_traits< vector_t, int >
 
struct  tlapack::traits::vector_type_traits< vectorA_t, vectorB_t, vector_t... >
 

Typedefs

template<class T >
using tlapack::Create = traits::CreateFunctor< T, int >
 Alias for traits::CreateFunctor<,int>.
 
template<class T , int m, int n = -1>
using tlapack::CreateStatic = traits::CreateStaticFunctor< T, m, n, int >
 Alias for traits::CreateStaticFunctor<,int>.
 
template<class... matrix_t>
using tlapack::matrix_type = typename traits::matrix_type_traits< matrix_t..., int >::type
 Common matrix type deduced from the list of types.
 
template<class T >
using tlapack::size_type = typename traits::size_type_trait< T, int >::type
 Size type of a matrix or vector.
 
template<class T >
using tlapack::type_t = typename traits::entry_type_trait< T, int >::type
 Entry type of a matrix or vector.
 
template<class... vector_t>
using tlapack::vector_type = typename traits::vector_type_traits< vector_t..., int >::type
 Common vector type deduced from the list of types.
 

Variables

template<class array_t >
constexpr Layout tlapack::layout = traits::layout_trait<array_t, int>::value
 Layout of a matrix or vector.
 

Detailed Description

Author
Weslley S Pereira, University of Colorado Denver, USA

Typedef Documentation

◆ Create

template<class T >
using tlapack::Create = typedef traits::CreateFunctor<T, int>

Alias for traits::CreateFunctor<,int>.

Usage:

// matrix_t is a predefined type at this point
tlapack::Create<matrix_t> new_matrix; // Creates the functor
size_t m = 11;
size_t n = 6;
std::vector<float> A_container; // Empty vector
auto A = new_matrix(A_container, m, n); // Initialize A_container if needed
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113

◆ CreateStatic

template<class T , int m, int n = -1>
using tlapack::CreateStatic = typedef traits::CreateStaticFunctor<T, m, n, int>

Alias for traits::CreateStaticFunctor<,int>.

Usage:

// matrix_t and vector_t are predefined types at this point
constexpr size_t M = 8;
constexpr size_t N = 6;
tlapack::CreateStatic<matrix_t, M, N> new_MbyN_matrix; // Creates the functor
tlapack::CreateStatic<vector_t, N> new_N_vector; // Creates the functor
float A_container[M * N]; // Array of size M * N
auto A = new_MbyN_matrix(A_container);
double B_container[N]; // Array of size N
auto B = new_N_vector(B_container);