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 46 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 48 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 56 of file glue_metaprog.hpp.

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

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


Member Data Documentation

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