lin
Public Types | Static Public Attributes | List of all members
lin::internal::traits< C > Struct Template Reference

Collection of compile time information about a specific tensor class. More...

#include <lin/core/traits/tensor.hpp>

Public Types

typedef _elem_t< C > elem_t
 Tensor's element type. More...
 
typedef _eval_t< C > eval_t
 Tensor's evalutation type. More...
 

Static Public Attributes

static constexpr size_t rows = _dims<C>::rows
 Row count. More...
 
static constexpr size_t cols = _dims<C>::cols
 Column count. More...
 
static constexpr size_t size = rows * cols
 Total element count. More...
 
static constexpr size_t max_rows = _dims<C>::max_rows
 Max row count. More...
 
static constexpr size_t max_cols = _dims<C>::max_cols
 Max column count. More...
 
static constexpr size_t max_size = max_rows * max_cols
 Max total element count. More...
 

Detailed Description

template<class C>
struct lin::internal::traits< C >

Collection of compile time information about a specific tensor class.

Template Parameters
CTensor type.

More details to come...

See also
internal::_elem
internal::_eval
internal::_dims

Member Typedef Documentation

template<class C>
typedef _elem_t<C> lin::internal::traits< C >::elem_t

Tensor's element type.

This si the type returned when accessing tensor elements via internal::Stream::operator()().

template<class C>
typedef _eval_t<C> lin::internal::traits< C >::eval_t

Tensor's evalutation type.

This is the type returned when forcing the generation of a temporary with a call to internal::Stream::eval().

This type will always be some sort of Matrix, RowVector, or Vector.

Member Data Documentation

template<class C>
constexpr size_t lin::internal::traits< C >::rows = _dims<C>::rows
static

Row count.

Defines the number of rows a given tensor type has at compile time. If nonzero, the row dimension is fixed. If zero, the row dimension is allowed to vary.

template<class C>
constexpr size_t lin::internal::traits< C >::cols = _dims<C>::cols
static

Column count.

Defines the number of columns a given tensor type has at compile time. If nonzero, the column dimension is fixed. If zero, the column dimension is allowed to vary.

template<class C>
constexpr size_t lin::internal::traits< C >::size = rows * cols
static

Total element count.

Defines the number of elements a given tensor type has at compile time. This is set as the row count time the column count.

template<class C>
constexpr size_t lin::internal::traits< C >::max_rows = _dims<C>::max_rows
static

Max row count.

Defines the maximum number of rows a given tensor type can have. This should be equal to the row count unless the row count is zero.

template<class C>
constexpr size_t lin::internal::traits< C >::max_cols = _dims<C>::max_cols
static

Max column count.

Defines the maximum number of columns a given tensor type can have. This should be equal to the column count unless the column count is zero.

template<class C>
constexpr size_t lin::internal::traits< C >::max_size = max_rows * max_cols
static

Max total element count.

Defines the maximum number of elements a given tensor type can have. This is set as the max row count times the max column count.


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