CUB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Namespaces | Macros | Enumerations
type_utils.cuh File Reference
#include <iostream>
#include "ns_wrapper.cuh"

Classes

struct  cub::ArrayTraits< ArrayType, LENGTH >
 Array traits. More...
 
struct  cub::BaseTraits< _CATEGORY, _PRIMITIVE, _NULL_TYPE, _UnsignedBits >
 Basic type traits. More...
 
struct  cub::EnableIf< Condition, T >
 Simple enable-if (similar to Boost) More...
 
struct  cub::Equals< A, B >
 Type equality test. More...
 
struct  cub::If< IF, ThenType, ElseType >
 Type selection (IF ? ThenType : ElseType) More...
 
struct  cub::IsVolatile< Tp >
 Volatile modifier test. More...
 
struct  cub::Log2< N, CURRENT_VAL, COUNT >
 Statically determine log2(N), rounded up. More...
 
struct  cub::NullType
 A simple "NULL" marker type. More...
 
struct  cub::NumericTraits< T >
 Numeric type traits. More...
 
struct  cub::RemoveQualifiers< Tp, Up >
 Removes const and volatile qualifiers from type Tp. More...
 
struct  cub::Traits< T >
 Type traits. More...
 

Namespaces

namespace  cub
 CUB namespace.
 

Macros

#define CUB_HAS_NESTED_TYPE(detect_struct, nested_type_name)
 

Enumerations

enum  cub::Category { NOT_A_NUMBER, SIGNED_INTEGER, UNSIGNED_INTEGER, FLOATING_POINT }
 Basic type traits categories.
 

Detailed Description

Common type manipulation (metaprogramming) utilities

Macro Definition Documentation

#define CUB_HAS_NESTED_TYPE (   detect_struct,
  nested_type_name 
)
Value:
template <typename T> \
struct detect_struct \
{ \
template <typename C> \
static char& test(typename C::nested_type_name*); \
template <typename> \
static int& test(...); \
enum \
{ \
VALUE = sizeof(test<T>(0)) < sizeof(int) \
}; \
};

Allows the definition of structures that will detect the presence of the specified type name within other classes