mxnet
Classes | Namespaces | Macros | Functions
type_traits.h File Reference

type traits information header More...

#include "./base.h"
#include <type_traits>
#include <string>
Include dependency graph for type_traits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dmlc::is_pod< T >
 whether a type is pod type More...
 
struct  dmlc::is_integral< T >
 whether a type is integer type More...
 
struct  dmlc::is_floating_point< T >
 whether a type is floating point type More...
 
struct  dmlc::is_arithmetic< T >
 whether a type is arithemetic type More...
 
struct  dmlc::type_name_helper< T >
 helper class to construct a string that represents type name More...
 
struct  dmlc::has_saveload< T >
 whether a type have save/load function More...
 
struct  dmlc::IfThenElseType< cond, Then, Else >
 template to select type based on condition For example, IfThenElseType<true, int, float>::Type will give int More...
 

Namespaces

 dmlc
 namespace for dmlc
 

Macros

#define DMLC_DECLARE_TRAITS(Trait, Type, Value)
 macro to quickly declare traits information More...
 
#define DMLC_DECLARE_TYPE_NAME(Type, Name)
 macro to quickly declare traits information More...
 

Functions

template<typename T >
std::string dmlc::type_name ()
 the string representation of type name More...
 

Detailed Description

type traits information header

Copyright (c) 2015 by Contributors

Macro Definition Documentation

#define DMLC_DECLARE_TRAITS (   Trait,
  Type,
  Value 
)
Value:
template<> \
struct Trait<Type> { \
static const bool value = Value; \
}

macro to quickly declare traits information

#define DMLC_DECLARE_TYPE_NAME (   Type,
  Name 
)
Value:
template<> \
struct type_name_helper<Type> { \
static inline std::string value() { \
return Name; \
} \
}

macro to quickly declare traits information