Memosa-FVM  0.2
NumTypeTraits< bool > Struct Template Reference

#include <NumType.h>

Public Types

typedef bool This_T
 
typedef bool T_Scalar
 
typedef bool T_BuiltIn
 

Static Public Member Functions

static PrimType getPrimType ()
 
static string getTypeName ()
 
static int getDimension ()
 
static void getShape (int *shp)
 
static int getDataSize ()
 
static bool getZero ()
 
static bool getUnity ()
 
static bool getNegativeUnity ()
 
static bool sqrt (const bool x)
 
static void write (FILE *fp, const bool x)
 
static void accumulateOneNorm (bool &sum, const bool &v)
 
static void accumulateDotProduct (bool &sum, const bool &v0, const bool &v1)
 
static void reduceSum (T_Scalar &sum, const This_T &x)
 
static void safeDivide (bool &x, const bool &y)
 
static void normalize (bool &x, const bool &y)
 
static void setMax (bool &x, const bool &y)
 

Detailed Description

template<>
struct NumTypeTraits< bool >

Definition at line 31 of file NumType.h.

Member Typedef Documentation

typedef bool NumTypeTraits< bool >::T_BuiltIn

Definition at line 35 of file NumType.h.

typedef bool NumTypeTraits< bool >::T_Scalar

Definition at line 34 of file NumType.h.

typedef bool NumTypeTraits< bool >::This_T

Definition at line 33 of file NumType.h.

Member Function Documentation

static void NumTypeTraits< bool >::accumulateDotProduct ( bool &  sum,
const bool &  v0,
const bool &  v1 
)
inlinestatic

Definition at line 50 of file NumType.h.

51  {}
static void NumTypeTraits< bool >::accumulateOneNorm ( bool &  sum,
const bool &  v 
)
inlinestatic

Definition at line 49 of file NumType.h.

49 {}
static int NumTypeTraits< bool >::getDataSize ( )
inlinestatic

Definition at line 41 of file NumType.h.

41 {return sizeof(bool);}
static int NumTypeTraits< bool >::getDimension ( )
inlinestatic

Definition at line 39 of file NumType.h.

39 {return 0;}
static bool NumTypeTraits< bool >::getNegativeUnity ( )
inlinestatic

Definition at line 44 of file NumType.h.

44 {return false;}
static PrimType NumTypeTraits< bool >::getPrimType ( )
inlinestatic

Definition at line 37 of file NumType.h.

References PRIM_TYPE_BOOL.

37 {return PRIM_TYPE_BOOL;}
static void NumTypeTraits< bool >::getShape ( int *  shp)
inlinestatic

Definition at line 40 of file NumType.h.

40 {}
static string NumTypeTraits< bool >::getTypeName ( )
inlinestatic

Definition at line 38 of file NumType.h.

38 {return "bool";}
static bool NumTypeTraits< bool >::getUnity ( )
inlinestatic

Definition at line 43 of file NumType.h.

43 {return true;}
static bool NumTypeTraits< bool >::getZero ( )
inlinestatic

Definition at line 42 of file NumType.h.

42 {return false;}
static void NumTypeTraits< bool >::normalize ( bool &  x,
const bool &  y 
)
inlinestatic

Definition at line 56 of file NumType.h.

56 {}
static void NumTypeTraits< bool >::reduceSum ( T_Scalar sum,
const This_T x 
)
inlinestatic

Definition at line 53 of file NumType.h.

53 {}
static void NumTypeTraits< bool >::safeDivide ( bool &  x,
const bool &  y 
)
inlinestatic

Definition at line 55 of file NumType.h.

55 {}
static void NumTypeTraits< bool >::setMax ( bool &  x,
const bool &  y 
)
inlinestatic

Definition at line 57 of file NumType.h.

57 {}
static bool NumTypeTraits< bool >::sqrt ( const bool  x)
inlinestatic

Definition at line 46 of file NumType.h.

46 {return false;}
static void NumTypeTraits< bool >::write ( FILE *  fp,
const bool  x 
)
inlinestatic

Definition at line 48 of file NumType.h.

48 {fprintf(fp,"%d",(int)x);}

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