TECA
The Toolkit for Extreme Climate Analysis
teca_type_select.h File Reference
#include "teca_config.h"
Include dependency graph for teca_type_select.h:

Go to the source code of this file.

Classes

struct  teca_type_select::elevate< t1, t2 >
 Select the higher precision type. More...
 
struct  teca_type_select::decay< t1, t2 >
 Select the lower precision type. More...
 
struct  teca_type_select::elevate< double, double >
 
struct  teca_type_select::elevate< double, float >
 
struct  teca_type_select::elevate< float, double >
 
struct  teca_type_select::elevate< double, char >
 
struct  teca_type_select::elevate< char, double >
 
struct  teca_type_select::elevate< double, short >
 
struct  teca_type_select::elevate< short, double >
 
struct  teca_type_select::elevate< double, int >
 
struct  teca_type_select::elevate< int, double >
 
struct  teca_type_select::elevate< double, long >
 
struct  teca_type_select::elevate< long, double >
 
struct  teca_type_select::elevate< double, long long >
 
struct  teca_type_select::elevate< long long, double >
 
struct  teca_type_select::elevate< double, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, double >
 
struct  teca_type_select::elevate< double, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, double >
 
struct  teca_type_select::elevate< double, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, double >
 
struct  teca_type_select::elevate< double, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, double >
 
struct  teca_type_select::elevate< double, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, double >
 
struct  teca_type_select::elevate< float, float >
 
struct  teca_type_select::elevate< float, char >
 
struct  teca_type_select::elevate< char, float >
 
struct  teca_type_select::elevate< float, short >
 
struct  teca_type_select::elevate< short, float >
 
struct  teca_type_select::elevate< float, int >
 
struct  teca_type_select::elevate< int, float >
 
struct  teca_type_select::elevate< float, long >
 
struct  teca_type_select::elevate< long, float >
 
struct  teca_type_select::elevate< float, long long >
 
struct  teca_type_select::elevate< long long, float >
 
struct  teca_type_select::elevate< float, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, float >
 
struct  teca_type_select::elevate< float, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, float >
 
struct  teca_type_select::elevate< float, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, float >
 
struct  teca_type_select::elevate< float, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, float >
 
struct  teca_type_select::elevate< float, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, float >
 
struct  teca_type_select::elevate< long long, long long >
 
struct  teca_type_select::elevate< long long, char >
 
struct  teca_type_select::elevate< char, long long >
 
struct  teca_type_select::elevate< long long, short >
 
struct  teca_type_select::elevate< short, long long >
 
struct  teca_type_select::elevate< long long, int >
 
struct  teca_type_select::elevate< int, long long >
 
struct  teca_type_select::elevate< long long, long >
 
struct  teca_type_select::elevate< long, long long >
 
struct  teca_type_select::elevate< long long, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, long long >
 
struct  teca_type_select::elevate< long long, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, long long >
 
struct  teca_type_select::elevate< long long, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, long long >
 
struct  teca_type_select::elevate< long long, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, long long >
 
struct  teca_type_select::elevate< long long, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, long long >
 
struct  teca_type_select::elevate< unsigned long long, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, char >
 
struct  teca_type_select::elevate< char, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, short >
 
struct  teca_type_select::elevate< short, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, int >
 
struct  teca_type_select::elevate< int, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, long >
 
struct  teca_type_select::elevate< long, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, unsigned long long >
 
struct  teca_type_select::elevate< unsigned long long, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, unsigned long long >
 
struct  teca_type_select::elevate< long, long >
 
struct  teca_type_select::elevate< long, char >
 
struct  teca_type_select::elevate< char, long >
 
struct  teca_type_select::elevate< long, short >
 
struct  teca_type_select::elevate< short, long >
 
struct  teca_type_select::elevate< long, int >
 
struct  teca_type_select::elevate< int, long >
 
struct  teca_type_select::elevate< long, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, long >
 
struct  teca_type_select::elevate< long, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, long >
 
struct  teca_type_select::elevate< long, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, long >
 
struct  teca_type_select::elevate< long, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, long >
 
struct  teca_type_select::elevate< unsigned long, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, char >
 
struct  teca_type_select::elevate< char, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, short >
 
struct  teca_type_select::elevate< short, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, int >
 
struct  teca_type_select::elevate< int, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, unsigned long >
 
struct  teca_type_select::elevate< unsigned long, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, unsigned long >
 
struct  teca_type_select::elevate< int, int >
 
struct  teca_type_select::elevate< int, char >
 
struct  teca_type_select::elevate< char, int >
 
struct  teca_type_select::elevate< int, short >
 
struct  teca_type_select::elevate< short, int >
 
struct  teca_type_select::elevate< int, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, int >
 
struct  teca_type_select::elevate< int, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, int >
 
struct  teca_type_select::elevate< int, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, int >
 
struct  teca_type_select::elevate< unsigned int, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, char >
 
struct  teca_type_select::elevate< char, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, short >
 
struct  teca_type_select::elevate< short, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, unsigned int >
 
struct  teca_type_select::elevate< unsigned int, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, unsigned int >
 
struct  teca_type_select::elevate< short, short >
 
struct  teca_type_select::elevate< short, char >
 
struct  teca_type_select::elevate< char, short >
 
struct  teca_type_select::elevate< short, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, short >
 
struct  teca_type_select::elevate< short, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, short >
 
struct  teca_type_select::elevate< unsigned short, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, char >
 
struct  teca_type_select::elevate< char, unsigned short >
 
struct  teca_type_select::elevate< unsigned short, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, unsigned short >
 
struct  teca_type_select::elevate< char, char >
 
struct  teca_type_select::elevate< char, unsigned char >
 
struct  teca_type_select::elevate< unsigned char, char >
 
struct  teca_type_select::elevate< unsigned char, unsigned char >
 
struct  teca_type_select::decay< double, double >
 
struct  teca_type_select::decay< double, float >
 
struct  teca_type_select::decay< float, double >
 
struct  teca_type_select::decay< double, char >
 
struct  teca_type_select::decay< char, double >
 
struct  teca_type_select::decay< double, int >
 
struct  teca_type_select::decay< int, double >
 
struct  teca_type_select::decay< double, long >
 
struct  teca_type_select::decay< long, double >
 
struct  teca_type_select::decay< double, long long >
 
struct  teca_type_select::decay< long long, double >
 
struct  teca_type_select::decay< double, unsigned char >
 
struct  teca_type_select::decay< unsigned char, double >
 
struct  teca_type_select::decay< double, unsigned int >
 
struct  teca_type_select::decay< unsigned int, double >
 
struct  teca_type_select::decay< double, unsigned long >
 
struct  teca_type_select::decay< unsigned long, double >
 
struct  teca_type_select::decay< double, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, double >
 
struct  teca_type_select::decay< float, float >
 
struct  teca_type_select::decay< float, char >
 
struct  teca_type_select::decay< char, float >
 
struct  teca_type_select::decay< float, int >
 
struct  teca_type_select::decay< int, float >
 
struct  teca_type_select::decay< float, long >
 
struct  teca_type_select::decay< long, float >
 
struct  teca_type_select::decay< float, long long >
 
struct  teca_type_select::decay< long long, float >
 
struct  teca_type_select::decay< float, unsigned char >
 
struct  teca_type_select::decay< unsigned char, float >
 
struct  teca_type_select::decay< float, unsigned int >
 
struct  teca_type_select::decay< unsigned int, float >
 
struct  teca_type_select::decay< float, unsigned long >
 
struct  teca_type_select::decay< unsigned long, float >
 
struct  teca_type_select::decay< float, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, float >
 
struct  teca_type_select::decay< long long, long long >
 
struct  teca_type_select::decay< long long, char >
 
struct  teca_type_select::decay< char, long long >
 
struct  teca_type_select::decay< long long, int >
 
struct  teca_type_select::decay< int, long long >
 
struct  teca_type_select::decay< long long, long >
 
struct  teca_type_select::decay< long, long long >
 
struct  teca_type_select::decay< long long, unsigned char >
 
struct  teca_type_select::decay< unsigned char, long long >
 
struct  teca_type_select::decay< long long, unsigned int >
 
struct  teca_type_select::decay< unsigned int, long long >
 
struct  teca_type_select::decay< long long, unsigned long >
 
struct  teca_type_select::decay< unsigned long, long long >
 
struct  teca_type_select::decay< long long, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, long long >
 
struct  teca_type_select::decay< unsigned long long, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, char >
 
struct  teca_type_select::decay< char, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, int >
 
struct  teca_type_select::decay< int, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, long >
 
struct  teca_type_select::decay< long, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, unsigned char >
 
struct  teca_type_select::decay< unsigned char, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, unsigned int >
 
struct  teca_type_select::decay< unsigned int, unsigned long long >
 
struct  teca_type_select::decay< unsigned long long, unsigned long >
 
struct  teca_type_select::decay< unsigned long, unsigned long long >
 
struct  teca_type_select::decay< long, long >
 
struct  teca_type_select::decay< long, char >
 
struct  teca_type_select::decay< char, long >
 
struct  teca_type_select::decay< long, int >
 
struct  teca_type_select::decay< int, long >
 
struct  teca_type_select::decay< long, unsigned char >
 
struct  teca_type_select::decay< unsigned char, long >
 
struct  teca_type_select::decay< long, unsigned int >
 
struct  teca_type_select::decay< unsigned int, long >
 
struct  teca_type_select::decay< long, unsigned long >
 
struct  teca_type_select::decay< unsigned long, long >
 
struct  teca_type_select::decay< unsigned long, unsigned long >
 
struct  teca_type_select::decay< unsigned long, char >
 
struct  teca_type_select::decay< char, unsigned long >
 
struct  teca_type_select::decay< unsigned long, int >
 
struct  teca_type_select::decay< int, unsigned long >
 
struct  teca_type_select::decay< unsigned long, unsigned char >
 
struct  teca_type_select::decay< unsigned char, unsigned long >
 
struct  teca_type_select::decay< unsigned long, unsigned int >
 
struct  teca_type_select::decay< unsigned int, unsigned long >
 
struct  teca_type_select::decay< int, int >
 
struct  teca_type_select::decay< int, char >
 
struct  teca_type_select::decay< char, int >
 
struct  teca_type_select::decay< int, unsigned char >
 
struct  teca_type_select::decay< unsigned char, int >
 
struct  teca_type_select::decay< int, unsigned int >
 
struct  teca_type_select::decay< unsigned int, int >
 
struct  teca_type_select::decay< unsigned int, unsigned int >
 
struct  teca_type_select::decay< unsigned int, char >
 
struct  teca_type_select::decay< char, unsigned int >
 
struct  teca_type_select::decay< unsigned int, unsigned char >
 
struct  teca_type_select::decay< unsigned char, unsigned int >
 
struct  teca_type_select::decay< char, char >
 
struct  teca_type_select::decay< char, unsigned char >
 
struct  teca_type_select::decay< unsigned char, char >
 
struct  teca_type_select::decay< unsigned char, unsigned char >
 

Namespaces

 teca_type_select
 Select a type based on input type(s)
 

Macros

#define teca_type_select(_class, _ret, _t1, _t2)
 
#define teca_type_elevate_case(_ret, _t1, _t2)   teca_type_select(elevate, _ret, _t1, _t2) \
 
#define teca_type_elevate_sym_case(_ret, _t1, _t2)
 
#define teca_type_decay_case(_ret, _t1, _t2)   teca_type_select(decay, _ret, _t1, _t2) \
 
#define teca_type_decay_sym_case(_ret, _t1, _t2)
 

Macro Definition Documentation

◆ teca_type_decay_sym_case

#define teca_type_decay_sym_case (   _ret,
  _t1,
  _t2 
)
Value:
teca_type_decay_case(_ret, _t1, _t2) \
teca_type_decay_case(_ret, _t2, _t1)

◆ teca_type_elevate_sym_case

#define teca_type_elevate_sym_case (   _ret,
  _t1,
  _t2 
)
Value:
teca_type_elevate_case(_ret, _t1, _t2) \
teca_type_elevate_case(_ret, _t2, _t1)

◆ teca_type_select

#define teca_type_select (   _class,
  _ret,
  _t1,
  _t2 
)
Value:
/** Given _t1 and _t2 _class to _ret */ \
template <> \
struct _class<_t1, _t2> \
{ \
/** _class result type */ \
using type = _ret; \
\
/** cast to _ret */ \
static _ret cast(_t1 arg){ return arg; } \
\
/** name of the _class result type */ \
static constexpr const char *type_name() \
{ return #_ret; } \
};