Fermat
Modules | Classes | Macros | Typedefs | Functions | Variables
Basic

Detailed Description

Modules

 Automatic-Differentiation
 
 Algorithms
 
 Atomics Module
 
 CUDA
 
 Basic Functors Module
 
 Memory
 
 Utilities
 
 Vector Types
 
 Parallel Primitives
 
 Priority Queues
 
 Register Arrays
 
 Threads
 
 Timers Module
 
 System Tags
 
 Iterators
 

Classes

struct  cugar::cuda_error
 
struct  cugar::bad_alloc
 
struct  cugar::runtime_error
 
struct  cugar::logic_error
 
struct  cugar::iterator_category_system< iterator_category >
 
struct  cugar::iterator_category_system< input_host_iterator_tag >
 
struct  cugar::iterator_category_system< output_host_iterator_tag >
 
struct  cugar::iterator_category_system< forward_host_iterator_tag >
 
struct  cugar::iterator_category_system< bidirectional_host_iterator_tag >
 
struct  cugar::iterator_category_system< random_access_host_iterator_tag >
 
struct  cugar::iterator_category_system< input_device_iterator_tag >
 
struct  cugar::iterator_category_system< output_device_iterator_tag >
 
struct  cugar::iterator_category_system< forward_device_iterator_tag >
 
struct  cugar::iterator_category_system< bidirectional_device_iterator_tag >
 
struct  cugar::iterator_category_system< random_access_device_iterator_tag >
 
struct  cugar::iterator_category_system< input_universal_iterator_tag >
 
struct  cugar::iterator_category_system< output_universal_iterator_tag >
 
struct  cugar::iterator_category_system< forward_universal_iterator_tag >
 
struct  cugar::iterator_category_system< bidirectional_universal_iterator_tag >
 
struct  cugar::iterator_category_system< random_access_universal_iterator_tag >
 
struct  cugar::iterator_system< iterator >
 
struct  cugar::iterator_traits< T >
 
struct  cugar::LCG_random
 
struct  cugar::FLCG_random
 
struct  cugar::field_traits< T >
 
struct  cugar::field_traits< int8 >
 
struct  cugar::field_traits< int16 >
 
struct  cugar::field_traits< int32 >
 
struct  cugar::field_traits< int64 >
 
struct  cugar::null_type
 
struct  cugar::vector_view< Iterator, IndexType >
 
struct  cugar::plain_view_subtype< std::vector< T > >
 
struct  cugar::plain_view_subtype< const std::vector< T > >
 

Macros

#define CUGAR_RAND_A   1664525
 
#define CUGAR_RAND_C   1013904223
 

Typedefs

typedef std::input_iterator_tag cugar::input_host_iterator_tag
 
typedef std::output_iterator_tag cugar::output_host_iterator_tag
 
typedef std::forward_iterator_tag cugar::forward_host_iterator_tag
 
typedef std::bidirectional_iterator_tag cugar::bidirectional_host_iterator_tag
 
typedef std::random_access_iterator_tag cugar::random_access_host_iterator_tag
 
typedef thrust::input_device_iterator_tag cugar::input_device_iterator_tag
 
typedef thrust::output_device_iterator_tag cugar::output_device_iterator_tag
 
typedef thrust::forward_device_iterator_tag cugar::forward_device_iterator_tag
 
typedef thrust::bidirectional_device_iterator_tag cugar::bidirectional_device_iterator_tag
 
typedef thrust::random_access_device_iterator_tag cugar::random_access_device_iterator_tag
 
typedef thrust::input_universal_iterator_tag cugar::input_universal_iterator_tag
 
typedef thrust::output_universal_iterator_tag cugar::output_universal_iterator_tag
 
typedef thrust::forward_universal_iterator_tag cugar::forward_universal_iterator_tag
 
typedef thrust::bidirectional_universal_iterator_tag cugar::bidirectional_universal_iterator_tag
 
typedef thrust::random_access_universal_iterator_tag cugar::random_access_universal_iterator_tag
 
typedef unsigned long long cugar::uint64
 
typedef unsigned int cugar::uint32
 
typedef unsigned short cugar::uint16
 
typedef unsigned char cugar::uint8
 
typedef long long cugar::int64
 
typedef int cugar::int32
 
typedef short cugar::int16
 
typedef signed char cugar::int8
 
typedef std::allocator< T > cugar::default_vector_allocator< host_tag, T >::type
 
typedef thrust::device_malloc_allocator< T > cugar::default_vector_allocator< device_tag, T >::type
 
typedef host_tag cugar::vector< host_tag, T, Alloc >::system_tag
 
typedef thrust::host_vector< T, Alloc > cugar::vector< host_tag, T, Alloc >::base_type
 
typedef base_type::const_iterator cugar::vector< host_tag, T, Alloc >::const_iterator
 
typedef base_type::iterator cugar::vector< host_tag, T, Alloc >::iterator
 
typedef base_type::value_type cugar::vector< host_tag, T, Alloc >::value_type
 
typedef cugar::vector_view< T *, uint64 > cugar::vector< host_tag, T, Alloc >::plain_view_type
 
typedef cugar::vector_view< const T *, uint64 > cugar::vector< host_tag, T, Alloc >::const_plain_view_type
 
typedef device_tag cugar::vector< device_tag, T, Alloc >::system_tag
 
typedef thrust::device_vector< T, Alloc > cugar::vector< device_tag, T, Alloc >::base_type
 
typedef base_type::const_iterator cugar::vector< device_tag, T, Alloc >::const_iterator
 
typedef base_type::iterator cugar::vector< device_tag, T, Alloc >::iterator
 
typedef base_type::value_type cugar::vector< device_tag, T, Alloc >::value_type
 
typedef cugar::vector_view< T *, uint64 > cugar::vector< device_tag, T, Alloc >::plain_view_type
 
typedef cugar::vector_view< const T *, uint64 > cugar::vector< device_tag, T, Alloc >::const_plain_view_type
 
typedef host_tag cugar::host_vector< T >::system_tag
 
typedef vector< host_tag, T > cugar::host_vector< T >::base_type
 
typedef base_type::const_iterator cugar::host_vector< T >::const_iterator
 
typedef base_type::iterator cugar::host_vector< T >::iterator
 
typedef base_type::value_type cugar::host_vector< T >::value_type
 
typedef base_type::plain_view_type cugar::host_vector< T >::plain_view_type
 
typedef base_type::const_plain_view_type cugar::host_vector< T >::const_plain_view_type
 
typedef device_tag cugar::device_vector< T >::system_tag
 
typedef vector< device_tag, T > cugar::device_vector< T >::base_type
 
typedef base_type::const_iterator cugar::device_vector< T >::const_iterator
 
typedef base_type::iterator cugar::device_vector< T >::iterator
 
typedef base_type::value_type cugar::device_vector< T >::value_type
 
typedef base_type::plain_view_type cugar::device_vector< T >::plain_view_type
 
typedef base_type::const_plain_view_type cugar::device_vector< T >::const_plain_view_type
 
typedef device_tag cugar::caching_device_vector< T >::system_tag
 
typedef vector< device_tag, T, caching_device_allocator< T > > cugar::caching_device_vector< T >::base_type
 
typedef base_type::const_iterator cugar::caching_device_vector< T >::const_iterator
 
typedef base_type::iterator cugar::caching_device_vector< T >::iterator
 
typedef base_type::value_type cugar::caching_device_vector< T >::value_type
 
typedef base_type::plain_view_type cugar::caching_device_vector< T >::plain_view_type
 
typedef base_type::const_plain_view_type cugar::caching_device_vector< T >::const_plain_view_type
 
typedef T cugar::device_iterator_type< T >::type
 
typedef thrust::device_ptr< T > cugar::device_iterator_type< T * >::type
 
typedef thrust::device_ptr< const T > cugar::device_iterator_type< const T * >::type
 
typedef thrust::device_vector< T >::const_reference cugar::device_var< T >::const_reference
 
typedef thrust::device_vector< T >::reference cugar::device_var< T >::reference
 

Functions

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::comp (const uchar2 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char cugar::comp (const char2 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::comp (const uchar4 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char cugar::comp (const char4 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::comp (const uint2 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set (uint2 &a, const uint32 c, const uint32 v)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::comp (const ulonglong2 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set (ulonglong2 &a, const uint32 c, const uint64 v)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::comp (const int2 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::comp (const uint4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set (uint4 &a, const uint32 c, const uint32 v)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::comp (const int4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint16 cugar::comp (const ushort4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::comp (const ulonglong4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set (ulonglong4 &a, const uint32 c, const uint64 v)
 
template<typename T >
CUGAR_HOST_DEVICE T cugar::sgn (const T x)
 
CUGAR_HOST_DEVICE float cugar::round (const float x)
 
CUGAR_HOST_DEVICE int32 cugar::abs (const int32 a)
 
CUGAR_HOST_DEVICE int64 cugar::abs (const int64 a)
 
CUGAR_HOST_DEVICE float cugar::abs (const float a)
 
CUGAR_HOST_DEVICE double cugar::abs (const double a)
 
CUGAR_HOST_DEVICE float cugar::min (const float a, const float b)
 
CUGAR_HOST_DEVICE float cugar::max (const float a, const float b)
 
CUGAR_HOST_DEVICE int8 cugar::min (const int8 a, const int8 b)
 
CUGAR_HOST_DEVICE int8 cugar::max (const int8 a, const int8 b)
 
CUGAR_HOST_DEVICE uint8 cugar::min (const uint8 a, const uint8 b)
 
CUGAR_HOST_DEVICE uint8 cugar::max (const uint8 a, const uint8 b)
 
CUGAR_HOST_DEVICE uint16 cugar::min (const uint16 a, const uint16 b)
 
CUGAR_HOST_DEVICE uint16 cugar::max (const uint16 a, const uint16 b)
 
CUGAR_HOST_DEVICE int32 cugar::min (const int32 a, const int32 b)
 
CUGAR_HOST_DEVICE int32 cugar::max (const int32 a, const int32 b)
 
CUGAR_HOST_DEVICE uint32 cugar::min (const uint32 a, const uint32 b)
 
CUGAR_HOST_DEVICE uint32 cugar::max (const uint32 a, const uint32 b)
 
CUGAR_HOST_DEVICE int64 cugar::min (const int64 a, const int64 b)
 
CUGAR_HOST_DEVICE int64 cugar::max (const int64 a, const int64 b)
 
CUGAR_HOST_DEVICE uint64 cugar::min (const uint64 a, const uint64 b)
 
CUGAR_HOST_DEVICE uint64 cugar::max (const uint64 a, const uint64 b)
 
CUGAR_HOST_DEVICE uint32 cugar::quantize (const float x, const uint32 n)
 
float CUGAR_HOST_DEVICE cugar::mod (const float x, const float m)
 
float CUGAR_HOST_DEVICE cugar::sqr (const float x)
 
double CUGAR_HOST_DEVICE cugar::sqr (const double x)
 
CUGAR_HOST_DEVICE uint32 cugar::log2 (uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::saturate (const float x)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::hash (uint32 a)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::hash2 (uint32 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash (uint64 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash2 (uint64 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash3 (uint64 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::randfloat (unsigned i, unsigned p)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::reverse_bits (const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::radical_inverse (unsigned int n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::radical_inverse (uint64 bits, const uint64 scramble)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::permute (uint32 i, uint32 l, uint32 p)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::min3 (const uint8 op1, const uint8 op2, const uint8 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::min3 (const uint32 op1, const uint32 op2, const uint32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::max3 (const uint32 op1, const uint32 op2, const uint32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::min3 (const int32 op1, const int32 op2, const int32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::max3 (const int32 op1, const int32 op2, const int32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::min3 (const float op1, const float op2, const float op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::max3 (const float op1, const float op2, const float op3)
 
CUGAR_HOST_DEVICE float cugar::fast_pow (const float a, const float b)
 
CUGAR_HOST_DEVICE float cugar::fast_sin (const float x)
 
CUGAR_HOST_DEVICE float cugar::fast_cos (const float x)
 
CUGAR_HOST_DEVICE float cugar::fast_sqrt (const float x)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::sincosf (float phi, float *s, float *c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::rsqrtf (float x)
 
 cugar::vector< host_tag, T, Alloc >::vector (const size_t size=0, const T val=T())
 
template<typename OtherAlloc >
 cugar::vector< host_tag, T, Alloc >::vector (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
 cugar::vector< host_tag, T, Alloc >::vector (const thrust::device_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
vector< host_tag, T, Alloc > & cugar::vector< host_tag, T, Alloc >::operator= (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
vector< host_tag, T, Alloc > & cugar::vector< host_tag, T, Alloc >::operator= (const thrust::device_vector< T, OtherAlloc > &v)
 
 cugar::vector< host_tag, T, Alloc >::operator plain_view_type ()
 
 cugar::vector< host_tag, T, Alloc >::operator const_plain_view_type () const
 
void cugar::vector< host_tag, T, Alloc >::expand (const size_t sz)
 
T & cugar::vector< host_tag, T, Alloc >::last ()
 
const T & cugar::vector< host_tag, T, Alloc >::last () const
 
 cugar::vector< device_tag, T, Alloc >::vector (const size_t size=0, const T val=T())
 
template<typename OtherAlloc >
 cugar::vector< device_tag, T, Alloc >::vector (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
 cugar::vector< device_tag, T, Alloc >::vector (const thrust::device_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
vector< device_tag, T, Alloc > & cugar::vector< device_tag, T, Alloc >::operator= (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
vector< device_tag, T, Alloc > & cugar::vector< device_tag, T, Alloc >::operator= (const thrust::device_vector< T, OtherAlloc > &v)
 
 cugar::vector< device_tag, T, Alloc >::operator plain_view_type ()
 
 cugar::vector< device_tag, T, Alloc >::operator const_plain_view_type () const
 
void cugar::vector< device_tag, T, Alloc >::expand (const size_t sz)
 
T & cugar::vector< device_tag, T, Alloc >::last ()
 
const T & cugar::vector< device_tag, T, Alloc >::last () const
 
 cugar::host_vector< T >::host_vector (const size_t size=0, const T val=T())
 
template<typename OtherAlloc >
 cugar::host_vector< T >::host_vector (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
 cugar::host_vector< T >::host_vector (const thrust::device_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
host_vector< T > & cugar::host_vector< T >::operator= (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
host_vector< T > & cugar::host_vector< T >::operator= (const thrust::device_vector< T, OtherAlloc > &v)
 
 cugar::host_vector< T >::operator plain_view_type ()
 
 cugar::host_vector< T >::operator const_plain_view_type () const
 
 cugar::device_vector< T >::device_vector (const size_t size=0, const T val=T())
 
template<typename OtherAlloc >
 cugar::device_vector< T >::device_vector (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
 cugar::device_vector< T >::device_vector (const thrust::device_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
device_vector< T > & cugar::device_vector< T >::operator= (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
device_vector< T > & cugar::device_vector< T >::operator= (const thrust::device_vector< T, OtherAlloc > &v)
 
 cugar::device_vector< T >::operator plain_view_type ()
 
 cugar::device_vector< T >::operator const_plain_view_type () const
 
 cugar::caching_device_vector< T >::caching_device_vector (const size_t size=0, const T val=T())
 
template<typename OtherAlloc >
 cugar::caching_device_vector< T >::caching_device_vector (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
 cugar::caching_device_vector< T >::caching_device_vector (const thrust::device_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
caching_device_vector< T > & cugar::caching_device_vector< T >::operator= (const thrust::host_vector< T, OtherAlloc > &v)
 
template<typename OtherAlloc >
caching_device_vector< T > & cugar::caching_device_vector< T >::operator= (const thrust::device_vector< T, OtherAlloc > &v)
 
 cugar::caching_device_vector< T >::operator plain_view_type ()
 
 cugar::caching_device_vector< T >::operator const_plain_view_type () const
 
 cugar::device_var< T >::device_var (const T val=T())
 
device_var< T > & cugar::device_var< T >::operator= (const T &val)
 
device_var< T > & cugar::device_var< T >::operator+= (const T &val)
 
device_var< T > & cugar::device_var< T >::operator-= (const T &val)
 
 cugar::device_var< T >::operator T () const
 
const T * cugar::device_var< T >::ptr () const
 
T * cugar::device_var< T >::ptr ()
 
template<typename Iterator >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::length (const vector_view< Iterator > &vec)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::raw_pointer (const vector_view< T > &vec)
 
template<typename T , typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::begin (vector_view< T, I > &vec)
 
template<typename T , typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::begin (const vector_view< T, I > &vec)
 
template<typename T >
vector_view< T *, uint64 > cugar::plain_view (std::vector< T > &vec)
 
template<typename T >
vector_view< const T *, uint64 > cugar::plain_view (const std::vector< T > &vec)
 
template<typename T >
T * cugar::raw_pointer (std::vector< T > &vec)
 
template<typename T >
const T * cugar::raw_pointer (const std::vector< T > &vec)
 
template<typename T >
T * cugar::begin (T *vec)
 
template<typename T >
const T * cugar::begin (const T *vec)
 

Variables

device_vector< T > cugar::device_var< T >::x
 

Function Documentation

◆ abs() [1/4]

CUGAR_HOST_DEVICE int32 cugar::abs ( const int32  a)
inline

absolute value

◆ abs() [2/4]

CUGAR_HOST_DEVICE int64 cugar::abs ( const int64  a)
inline

absolute value

◆ abs() [3/4]

CUGAR_HOST_DEVICE float cugar::abs ( const float  a)
inline

absolute value

◆ abs() [4/4]

CUGAR_HOST_DEVICE double cugar::abs ( const double  a)
inline

absolute value

◆ begin() [1/4]

template<typename T , typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::begin ( vector_view< T, I > &  vec)

return the begin iterator of a vector_view

◆ begin() [2/4]

template<typename T , typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::begin ( const vector_view< T, I > &  vec)

return the begin iterator of a vector_view

◆ begin() [3/4]

template<typename T >
T* cugar::begin ( T *  vec)

return the begin iterator of a raw pointer

◆ begin() [4/4]

template<typename T >
const T* cugar::begin ( const T *  vec)

return the begin iterator of a raw pointer

◆ caching_device_vector()

template<typename T>
cugar::caching_device_vector< T >::caching_device_vector ( const size_t  size = 0,
const T  val = T() 
)
inline

constructor

◆ comp() [1/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::comp ( const uchar2  a,
const char  c 
)

return the c'th component of a by value

◆ comp() [2/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char cugar::comp ( const char2  a,
const char  c 
)

return the c'th component of a by value

◆ comp() [3/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::comp ( const uchar4  a,
const char  c 
)

return the c'th component of a by value

◆ comp() [4/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char cugar::comp ( const char4  a,
const char  c 
)

return the c'th component of a by value

◆ comp() [5/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::comp ( const uint2  a,
const uint32  c 
)

return the c'th component of a by value

◆ comp() [6/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::comp ( const ulonglong2  a,
const uint32  c 
)

return the c'th component of a by value

◆ comp() [7/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::comp ( const int2  a,
const uint32  c 
)

return the c'th component of a by value

◆ comp() [8/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::comp ( const uint4  a,
const uint32  c 
)

return the c'th component of a by value

◆ comp() [9/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::comp ( const int4  a,
const uint32  c 
)

return the c'th component of a by value

◆ comp() [10/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint16 cugar::comp ( const ushort4  a,
const uint32  c 
)

return the c'th component of a by value

◆ comp() [11/11]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::comp ( const ulonglong4  a,
const uint32  c 
)

return the c'th component of a by value

◆ device_var()

template<typename T>
cugar::device_var< T >::device_var ( const T  val = T())
inline

constructor

◆ device_vector()

template<typename T>
cugar::device_vector< T >::device_vector ( const size_t  size = 0,
const T  val = T() 
)
inline

constructor

◆ expand() [1/2]

template<typename T , typename Alloc >
void cugar::vector< host_tag, T, Alloc >::expand ( const size_t  sz)
inline

resize if larger

◆ expand() [2/2]

template<typename T , typename Alloc >
void cugar::vector< device_tag, T, Alloc >::expand ( const size_t  sz)
inline

resize if larger

◆ hash() [1/2]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::hash ( uint32  a)

compute a simple 32-bit hash

◆ hash() [2/2]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash ( uint64  key)

Thomas Wang's 64 bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm

◆ hash2() [1/2]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::hash2 ( uint32  key)

Thomas Wang's 32 bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm

◆ hash2() [2/2]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash2 ( uint64  key)

simple 64-bit hash

◆ hash3()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash3 ( uint64  key)

elf 64-bit hash

◆ host_vector()

template<typename T >
cugar::host_vector< T >::host_vector ( const size_t  size = 0,
const T  val = T() 
)
inline

constructor

◆ length()

template<typename Iterator >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::length ( const vector_view< Iterator > &  vec)

return length of a vector_view

◆ log2()

CUGAR_HOST_DEVICE uint32 cugar::log2 ( uint32  n)
inline

compute the log base 2 of an integer

◆ max() [1/8]

CUGAR_HOST_DEVICE float cugar::max ( const float  a,
const float  b 
)
inline

maximum of two floats

◆ max() [2/8]

CUGAR_HOST_DEVICE int8 cugar::max ( const int8  a,
const int8  b 
)
inline

maximum of two int8

◆ max() [3/8]

CUGAR_HOST_DEVICE uint8 cugar::max ( const uint8  a,
const uint8  b 
)
inline

maximum of two uint8

◆ max() [4/8]

CUGAR_HOST_DEVICE uint16 cugar::max ( const uint16  a,
const uint16  b 
)
inline

maximum of two uint16

◆ max() [5/8]

CUGAR_HOST_DEVICE int32 cugar::max ( const int32  a,
const int32  b 
)
inline

maximum of two int32

◆ max() [6/8]

CUGAR_HOST_DEVICE uint32 cugar::max ( const uint32  a,
const uint32  b 
)
inline

maximum of two uint32

◆ max() [7/8]

CUGAR_HOST_DEVICE int64 cugar::max ( const int64  a,
const int64  b 
)
inline

maximum of two int64

◆ max() [8/8]

CUGAR_HOST_DEVICE uint64 cugar::max ( const uint64  a,
const uint64  b 
)
inline

maximum of two uint64

◆ min() [1/8]

CUGAR_HOST_DEVICE float cugar::min ( const float  a,
const float  b 
)
inline

minimum of two floats

◆ min() [2/8]

CUGAR_HOST_DEVICE int8 cugar::min ( const int8  a,
const int8  b 
)
inline

minimum of two int8

◆ min() [3/8]

CUGAR_HOST_DEVICE uint8 cugar::min ( const uint8  a,
const uint8  b 
)
inline

minimum of two uint8

◆ min() [4/8]

CUGAR_HOST_DEVICE uint16 cugar::min ( const uint16  a,
const uint16  b 
)
inline

minimum of two uint16

◆ min() [5/8]

CUGAR_HOST_DEVICE int32 cugar::min ( const int32  a,
const int32  b 
)
inline

minimum of two int32

◆ min() [6/8]

CUGAR_HOST_DEVICE uint32 cugar::min ( const uint32  a,
const uint32  b 
)
inline

minimum of two uint32

◆ min() [7/8]

CUGAR_HOST_DEVICE int64 cugar::min ( const int64  a,
const int64  b 
)
inline

minimum of two int64

◆ min() [8/8]

CUGAR_HOST_DEVICE uint64 cugar::min ( const uint64  a,
const uint64  b 
)
inline

minimum of two uint64

◆ mod()

float CUGAR_HOST_DEVICE cugar::mod ( const float  x,
const float  m 
)
inline

compute the floating point module of a quantity with sign

◆ operator const_plain_view_type() [1/5]

template<typename T , typename Alloc >
cugar::vector< host_tag, T, Alloc >::operator const_plain_view_type ( ) const
inline

conversion to const_plain_view_type

◆ operator const_plain_view_type() [2/5]

template<typename T , typename Alloc >
cugar::vector< device_tag, T, Alloc >::operator const_plain_view_type ( ) const
inline

conversion to const_plain_view_type

◆ operator const_plain_view_type() [3/5]

template<typename T >
cugar::host_vector< T >::operator const_plain_view_type ( ) const
inline

conversion to const_plain_view_type

◆ operator const_plain_view_type() [4/5]

template<typename T>
cugar::device_vector< T >::operator const_plain_view_type ( ) const
inline

conversion to const_plain_view_type

◆ operator const_plain_view_type() [5/5]

template<typename T>
cugar::caching_device_vector< T >::operator const_plain_view_type ( ) const
inline

conversion to const_plain_view_type

◆ operator plain_view_type() [1/5]

template<typename T , typename Alloc >
cugar::vector< host_tag, T, Alloc >::operator plain_view_type ( )
inline

conversion to plain_view_type

◆ operator plain_view_type() [2/5]

template<typename T , typename Alloc >
cugar::vector< device_tag, T, Alloc >::operator plain_view_type ( )
inline

conversion to plain_view_type

◆ operator plain_view_type() [3/5]

template<typename T >
cugar::host_vector< T >::operator plain_view_type ( )
inline

conversion to plain_view_type

◆ operator plain_view_type() [4/5]

template<typename T>
cugar::device_vector< T >::operator plain_view_type ( )
inline

conversion to plain_view_type

◆ operator plain_view_type() [5/5]

template<typename T>
cugar::caching_device_vector< T >::operator plain_view_type ( )
inline

conversion to plain_view_type

◆ operator T()

template<typename T>
cugar::device_var< T >::operator T ( ) const
inline

automatic conversion

◆ operator+=()

template<typename T>
device_var<T>& cugar::device_var< T >::operator+= ( const T &  val)
inline

assignment

◆ operator-=()

template<typename T>
device_var<T>& cugar::device_var< T >::operator-= ( const T &  val)
inline

assignment

◆ operator=()

template<typename T>
device_var<T>& cugar::device_var< T >::operator= ( const T &  val)
inline

assignment

◆ permute()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::permute ( uint32  i,
uint32  l,
uint32  p 
)

A pseudorandom permutation function (see "Correlated Multi-Jittered Sampling", by Andrew Kensler)

◆ plain_view() [1/2]

template<typename T >
vector_view<T*,uint64> cugar::plain_view ( std::vector< T > &  vec)

return the plain view of a std::vector

◆ plain_view() [2/2]

template<typename T >
vector_view<const T*,uint64> cugar::plain_view ( const std::vector< T > &  vec)

return the plain view of a std::vector

◆ ptr() [1/2]

template<typename T>
const T* cugar::device_var< T >::ptr ( ) const
inline

return the device pointer

◆ ptr() [2/2]

template<typename T>
T* cugar::device_var< T >::ptr ( )
inline

return the device pointer

◆ quantize()

CUGAR_HOST_DEVICE uint32 cugar::quantize ( const float  x,
const uint32  n 
)
inline

quantize the float x in [0,1] to an integer [0,...,n[

◆ radical_inverse() [1/2]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::radical_inverse ( unsigned int  n)

return the radical inverse of an integer n

◆ radical_inverse() [2/2]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::radical_inverse ( uint64  bits,
const uint64  scramble 
)

Van der Corput radical inverse in base 2 with 52 bits precision.

◆ randfloat()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::randfloat ( unsigned  i,
unsigned  p 
)

an indexed random number generator (see "Correlated Multi-Jittered Sampling", by Andrew Kensler)

Parameters
ithe index in the random stream
pthe seed

◆ raw_pointer() [1/3]

template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::raw_pointer ( const vector_view< T > &  vec)

return the raw pointer of a vector_view

◆ raw_pointer() [2/3]

template<typename T >
T* cugar::raw_pointer ( std::vector< T > &  vec)

return the raw pointer of a std::vector

◆ raw_pointer() [3/3]

template<typename T >
const T* cugar::raw_pointer ( const std::vector< T > &  vec)

return the raw pointer of a std::vector

◆ reverse_bits()

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::reverse_bits ( const uint32  n)

reverse the bits of an integer n

◆ round()

CUGAR_HOST_DEVICE float cugar::round ( const float  x)
inline

round a floating point number

◆ set() [1/4]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set ( uint2 &  a,
const uint32  c,
const uint32  v 
)

set the c'th component of a

◆ set() [2/4]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set ( ulonglong2 &  a,
const uint32  c,
const uint64  v 
)

set the c'th component of a

◆ set() [3/4]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set ( uint4 &  a,
const uint32  c,
const uint32  v 
)

set the c'th component of a

◆ set() [4/4]

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set ( ulonglong4 &  a,
const uint32  c,
const uint64  v 
)

set the c'th component of a

◆ sgn()

template<typename T >
CUGAR_HOST_DEVICE T cugar::sgn ( const T  x)
inline

sign function

◆ sqr() [1/2]

float CUGAR_HOST_DEVICE cugar::sqr ( const float  x)
inline

compute the floating point square of a quantity

◆ sqr() [2/2]

double CUGAR_HOST_DEVICE cugar::sqr ( const double  x)
inline

compute the floating point square of a quantity

◆ vector() [1/2]

template<typename T , typename Alloc >
cugar::vector< host_tag, T, Alloc >::vector ( const size_t  size = 0,
const T  val = T() 
)
inline

constructor

◆ vector() [2/2]

template<typename T , typename Alloc >
cugar::vector< device_tag, T, Alloc >::vector ( const size_t  size = 0,
const T  val = T() 
)
inline

constructor