SST/macro
Classes | Macros | Typedefs | Functions
variable.h File Reference
#include <type_traits>
#include <cstddef>
#include <sstmac/software/process/thread.h>
Include dependency graph for variable.h:

Go to the source code of this file.

Classes

class  VariablePtr< T >
 
class  Variable< T >
 
class  Variable< T >
 
class  VariablePtr< T >
 

Macros

#define DECLARE_OPERATOR(op, CONST, REF)
 
#define FRIEND_OPERATOR(op, CONST, REF)
 
#define COMPARE(op)
 
#define OPERATOR(op, CONST, REF)
 

Typedefs

typedef Variable< double > Double
 
typedef VariablePtr< double > DoublePtr
 
typedef Variable< int > Int
 
typedef VariablePtr< int > IntPtr
 

Functions

template<class T >
Variable< T > sqrt (const Variable< T > &t)
 
template<class T >
Variable< T > cbrt (const Variable< T > &t)
 
template<class T >
Variable< T > fabs (const Variable< T > &t)
 
template<class T >
void * memset (const VariablePtr< T > &t, int value, size_t size)
 
template<class T >
void * memcpy (const VariablePtr< T > &dst, const VariablePtr< T > &src, size_t size)
 

Macro Definition Documentation

#define COMPARE (   op)
Value:
template <class T, class U> \
bool \
operator op(const Variable<T>& t, const U& u){ \
return true; \
} \
template <class T, class U> \
bool \
operator op(const U& u, const Variable<T>& t){ \
return true;\
} \
template <class T, class U> \
bool \
operator op(const Variable<T>& t, const Variable<U>& u){ \
return true; \
}

Definition at line 174 of file variable.h.

#define DECLARE_OPERATOR (   op,
  CONST,
  REF 
)
Value:
template <class T, class U> \
Variable<T>REF \
operator op(CONST Variable<T>& t, const U& u); \
template <class T, class U> \
U REF \
operator op(CONST U& u, const Variable<T>& t); \
template <class T, class U> \
Variable<T> REF \
operator op(CONST Variable<T>& t, const Variable<U>& u);

Definition at line 9 of file variable.h.

#define FRIEND_OPERATOR (   op,
  CONST,
  REF 
)
Value:
template <class T1, class U> \
friend Variable<T1> REF \
operator op(CONST Variable<T1>& t, const U& u); \
template <class T1, class U> \
friend U REF \
operator op(CONST U& u, const Variable<T1>& t); \
template <class T1, class U> \
friend Variable<T1> REF \
operator op(CONST Variable<T1>& t, const Variable<U>& u);

Definition at line 20 of file variable.h.

#define OPERATOR (   op,
  CONST,
  REF 
)
Value:
template <class T, class U> \
Variable<T>REF \
operator op(CONST Variable<T>& t, const U& u){ \
t.nops++; \
return t; \
} \
template <class T, class U> \
U REF \
operator op(CONST U& u, const Variable<T>& t){ \
t.nops++; \
return u;\
} \
template <class T, class U> \
Variable<T> REF \
operator op(CONST Variable<T>& t, const Variable<U>& u){ \
t.nops++; \
return t; \
}

Definition at line 191 of file variable.h.

Typedef Documentation

typedef Variable<double> Double

Definition at line 386 of file variable.h.

typedef VariablePtr<double> DoublePtr

Definition at line 387 of file variable.h.

typedef Variable<int> Int

Definition at line 388 of file variable.h.

typedef VariablePtr<int> IntPtr

Definition at line 389 of file variable.h.

Function Documentation

template<class T >
Variable< T > cbrt ( const Variable< T > &  t)

Definition at line 239 of file variable.h.

References Variable< T >::nops.

template<class T >
Variable< T > fabs ( const Variable< T > &  t)

Definition at line 246 of file variable.h.

References Variable< T >::nops.

Referenced by TestEquals< float >::equals(), and TestEquals< double >::equals().

template<class T >
void * memcpy ( const VariablePtr< T > &  dst,
const VariablePtr< T > &  src,
size_t  size 
)
template<class T >
void * memset ( const VariablePtr< T > &  t,
int  value,
size_t  size 
)

Definition at line 374 of file variable.h.

References VariablePtr< T >::nops.

template<class T >
Variable< T > sqrt ( const Variable< T > &  t)

Definition at line 232 of file variable.h.