Fermat
|
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 |
|
inline |
absolute value
|
inline |
absolute value
|
inline |
absolute value
|
inline |
absolute value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::begin | ( | vector_view< T, I > & | vec | ) |
return the begin iterator of a vector_view
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::begin | ( | const vector_view< T, I > & | vec | ) |
return the begin iterator of a vector_view
T* cugar::begin | ( | T * | vec | ) |
return the begin iterator of a raw pointer
const T* cugar::begin | ( | const T * | vec | ) |
return the begin iterator of a raw pointer
|
inline |
constructor
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::comp | ( | const uchar2 | a, |
const char | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char cugar::comp | ( | const char2 | a, |
const char | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 cugar::comp | ( | const uchar4 | a, |
const char | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char cugar::comp | ( | const char4 | a, |
const char | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::comp | ( | const uint2 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::comp | ( | const ulonglong2 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::comp | ( | const int2 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::comp | ( | const uint4 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 cugar::comp | ( | const int4 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint16 cugar::comp | ( | const ushort4 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::comp | ( | const ulonglong4 | a, |
const uint32 | c | ||
) |
return the c'th component of a by value
|
inline |
constructor
|
inline |
constructor
|
inline |
resize if larger
|
inline |
resize if larger
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::hash | ( | uint32 | a | ) |
compute a simple 32-bit hash
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
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
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash2 | ( | uint64 | key | ) |
simple 64-bit hash
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::hash3 | ( | uint64 | key | ) |
elf 64-bit hash
|
inline |
constructor
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::length | ( | const vector_view< Iterator > & | vec | ) |
return length of a vector_view
|
inline |
compute the log base 2 of an integer
|
inline |
maximum of two floats
|
inline |
maximum of two int8
|
inline |
maximum of two uint8
|
inline |
maximum of two uint16
|
inline |
maximum of two int32
|
inline |
maximum of two uint32
|
inline |
maximum of two int64
|
inline |
maximum of two uint64
|
inline |
minimum of two floats
|
inline |
minimum of two int8
|
inline |
minimum of two uint8
|
inline |
minimum of two uint16
|
inline |
minimum of two int32
|
inline |
minimum of two uint32
|
inline |
minimum of two int64
|
inline |
minimum of two uint64
|
inline |
compute the floating point module of a quantity with sign
|
inline |
conversion to const_plain_view_type
|
inline |
conversion to const_plain_view_type
|
inline |
conversion to const_plain_view_type
|
inline |
conversion to const_plain_view_type
|
inline |
conversion to const_plain_view_type
|
inline |
conversion to plain_view_type
|
inline |
conversion to plain_view_type
|
inline |
conversion to plain_view_type
|
inline |
conversion to plain_view_type
|
inline |
conversion to plain_view_type
|
inline |
automatic conversion
|
inline |
assignment
|
inline |
assignment
|
inline |
assignment
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)
vector_view<T*,uint64> cugar::plain_view | ( | std::vector< T > & | vec | ) |
return the plain view of a std::vector
vector_view<const T*,uint64> cugar::plain_view | ( | const std::vector< T > & | vec | ) |
return the plain view of a std::vector
|
inline |
return the device pointer
|
inline |
return the device pointer
|
inline |
quantize the float x in [0,1] to an integer [0,...,n[
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float cugar::radical_inverse | ( | unsigned int | n | ) |
return the radical inverse of an integer n
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.
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)
i | the index in the random stream |
p | the seed |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T cugar::raw_pointer | ( | const vector_view< T > & | vec | ) |
return the raw pointer of a vector_view
T* cugar::raw_pointer | ( | std::vector< T > & | vec | ) |
return the raw pointer of a std::vector
const T* cugar::raw_pointer | ( | const std::vector< T > & | vec | ) |
return the raw pointer of a std::vector
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::reverse_bits | ( | const uint32 | n | ) |
reverse the bits of an integer n
|
inline |
round a floating point number
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set | ( | uint2 & | a, |
const uint32 | c, | ||
const uint32 | v | ||
) |
set the c'th component of a
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set | ( | ulonglong2 & | a, |
const uint32 | c, | ||
const uint64 | v | ||
) |
set the c'th component of a
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set | ( | uint4 & | a, |
const uint32 | c, | ||
const uint32 | v | ||
) |
set the c'th component of a
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::set | ( | ulonglong4 & | a, |
const uint32 | c, | ||
const uint64 | v | ||
) |
set the c'th component of a
|
inline |
sign function
|
inline |
compute the floating point square of a quantity
|
inline |
compute the floating point square of a quantity
|
inline |
constructor
|
inline |
constructor