mat_ptrs< glue_type, T1 > Struct Template Reference
[Glue_metaprog]

Template metaprogram mat_ptrs fills a given array with addresses of matrices from a recursive instance of Glue<Tx,Ty, glue_type>. While parsing the recursive instance, if encountered objects are of type Op<..>, they are converted to type 'Mat' first. More...

#include <glue_metaprog.hpp>

List of all members.

Public Types

typedef T1::elem_type elem_type

Static Public Member Functions

static void get_ptrs (const Mat< elem_type > **ptrs, bool *del, const T1 &X)

Static Public Attributes

static const u32 num = 0

Detailed Description

template<typename glue_type, typename T1>
struct mat_ptrs< glue_type, T1 >

Template metaprogram mat_ptrs fills a given array with addresses of matrices from a recursive instance of Glue<Tx,Ty, glue_type>. While parsing the recursive instance, if encountered objects are of type Op<..>, they are converted to type 'Mat' first.

Definition at line 47 of file glue_metaprog.hpp.


Member Typedef Documentation

template<typename glue_type, typename T1>
typedef T1::elem_type mat_ptrs< glue_type, T1 >::elem_type

Definition at line 49 of file glue_metaprog.hpp.


Member Function Documentation

template<typename glue_type, typename T1>
static void mat_ptrs< glue_type, T1 >::get_ptrs ( const Mat< elem_type > **  ptrs,
bool *  del,
const T1 &  X 
) [inline, static]

Definition at line 57 of file glue_metaprog.hpp.

Referenced by mat_ptrs< glue_type, Glue< T1, T2, glue_type > >::get_ptrs().

00062     {
00063 
00064     ptrs[0] = 
00065       (
00066       is_Mat<T1>::value ?
00067         reinterpret_cast<const Mat<elem_type>*>(&X)
00068       :
00069         new Mat<elem_type>(X)
00070       );
00071 
00072     
00073     del[0] = 
00074       (
00075       is_Mat<T1>::value ?
00076         false
00077       :
00078         true
00079       );
00080 
00081     
00082     }


Member Data Documentation

template<typename glue_type, typename T1>
const u32 mat_ptrs< glue_type, T1 >::num = 0 [static]