Fermat
Classes | Typedefs | Enumerations | Functions
cugar Namespace Reference

Define a vector_view POD type and plain_view() for std::vector. More...

Classes

struct  abs_cosine_functor
 
struct  add
 
struct  AtomicInt
 
struct  bad_alloc
 
struct  Base_distribution
 
struct  Bbox
 
struct  bbox_area_functor
 
struct  binary_and
 
struct  binary_function_tag
 
struct  binary_or
 
struct  binary_switch
 
struct  binary_switch< A, B, 0 >
 
union  BinaryCast
 
struct  binder1st
 
struct  binder2nd
 
struct  Bintree_node
 
struct  Bintree_node< leaf_index_tag >
 
struct  Bintree_visitor
 
struct  Bintree_visitor< Node_type, leaf_index_tag >
 
struct  Bintree_visitor< Node_type, leaf_range_tag >
 
struct  Bintree_writer
 
struct  Bintree_writer_context
 
struct  Bintree_writer_context< node_type, leaf_index_tag >
 
struct  Bintree_writer_context< node_type, leaf_range_tag >
 
struct  Bitmask
 
struct  Bitmask< 1 >
 
struct  Bitmask< 2 >
 
struct  BlendBsdf
 
struct  block_strided_iterator
 
struct  Bounded_exponential
 
struct  Bounded_pareto_distribution
 
struct  Bvh
 
class  Bvh_builder
 
struct  Bvh_node
 
struct  Bvh_node_3d
 
struct  Bvh_node_3d_bbox_iterator
 
class  Bvh_sah_builder
 
struct  byte_caching_device_allocator
 
struct  caching_device_allocator
 
struct  caching_device_vector
 
struct  Cauchy_distribution
 
struct  clamped_cosine_functor
 
struct  component_functor
 
struct  compose_binary
 
struct  compose_unary
 
struct  compose_unary_after_binary
 
struct  composition_type
 
struct  composition_type< F1, F2, unary_function_tag, binary_function_tag >
 
struct  composition_type< F1, F2, unary_function_tag, unary_function_tag >
 
struct  constant_functor
 
struct  CorrelatedMJSampler
 
struct  Cosine_distribution
 
struct  CP_rotated_sequence
 
struct  CP_rotator
 
struct  cuda_error
 
struct  default_predicate
 
struct  default_vector_allocator
 
struct  default_vector_allocator< device_tag, T >
 
struct  default_vector_allocator< host_tag, T >
 
struct  device_iterator_type
 
struct  device_iterator_type< const T * >
 
struct  device_iterator_type< T * >
 
struct  device_tag
 
struct  device_var
 
struct  device_vector
 
struct  diff_var
 
struct  diff_var< ValType, 1, 0 >
 
struct  diff_var< ValType, 1, O >
 
struct  diff_var< ValType, N, 0 >
 
struct  DifferentialGeometry
 
struct  eq_constant
 
struct  equal_functor
 
struct  Exponential_distribution
 
struct  FakeTimer
 
struct  field_traits
 
struct  field_traits< int16 >
 
struct  field_traits< int32 >
 
struct  field_traits< int64 >
 
struct  field_traits< int8 >
 
struct  FLCG_random
 
struct  for_each_enactor
 
struct  for_each_enactor< device_tag >
 
struct  gather_functor
 
struct  Gaussian_distribution_2d
 
struct  Gaussian_distribution_symm_2d
 
struct  Gaussian_generator
 
struct  GenericOuterProduct
 
struct  GGXBsdf
 
struct  GGXSmithBsdf
 
struct  GGXSmithMicrofacetDistribution
 
struct  GGXVCavityMicrofacetDistribution
 
struct  greater
 
struct  greater_than_zero
 
struct  hi_bits_functor
 
struct  hi_bits_functor< uint16, uint32 >
 
struct  hi_bits_functor< uint32, uint32 >
 
struct  hi_bits_functor< uint32, uint64 >
 
struct  hi_bits_functor< uint8, uint32 >
 
struct  host_tag
 
struct  host_vector
 
struct  HSV
 
struct  if_constant
 
struct  if_equal
 
struct  if_true
 
struct  if_true< false, T, F >
 
struct  if_true< true, T, F >
 
struct  if_true_functor
 
struct  IRandom
 
struct  is_false_functor
 
struct  is_segment_sorted_iterator
 
struct  is_sorted_iterator
 
struct  is_true_functor
 
struct  iterator_category_system
 
struct  iterator_category_system< bidirectional_device_iterator_tag >
 
struct  iterator_category_system< bidirectional_host_iterator_tag >
 
struct  iterator_category_system< bidirectional_universal_iterator_tag >
 
struct  iterator_category_system< forward_device_iterator_tag >
 
struct  iterator_category_system< forward_host_iterator_tag >
 
struct  iterator_category_system< forward_universal_iterator_tag >
 
struct  iterator_category_system< input_device_iterator_tag >
 
struct  iterator_category_system< input_host_iterator_tag >
 
struct  iterator_category_system< input_universal_iterator_tag >
 
struct  iterator_category_system< output_device_iterator_tag >
 
struct  iterator_category_system< output_host_iterator_tag >
 
struct  iterator_category_system< output_universal_iterator_tag >
 
struct  iterator_category_system< random_access_device_iterator_tag >
 
struct  iterator_category_system< random_access_host_iterator_tag >
 
struct  iterator_category_system< random_access_universal_iterator_tag >
 
struct  iterator_system
 
struct  iterator_traits
 
struct  Kd_node
 
struct  l_bit_shift
 
struct  LambertBsdf
 
struct  LambertEdf
 
struct  LambertTransBsdf
 
struct  LCG_random
 
struct  leading_bits
 
struct  leaf_index_tag
 
struct  leaf_range_tag
 
struct  less
 
class  LFSRGeneratorMatrix
 
struct  LFSRRandomStream
 
struct  LHSampler
 
struct  logic_error
 
struct  LTCBsdf
 
struct  mask_and
 
struct  mask_or
 
struct  Matrix
 
struct  max_functor
 
struct  memory_arena
 
struct  min_functor
 
struct  minus_one
 
struct  Mixture
 
struct  MJSampler
 
struct  morton_functor
 
struct  morton_functor< uint32, 2u, BboxType >
 
struct  morton_functor< uint32, 3u, BboxType >
 
struct  morton_functor< uint64, 2u, BboxType >
 
struct  morton_functor< uint64, 3u, BboxType >
 
class  Mutex
 
struct  MutexImpl
 Mutex class. More...
 
struct  neq_constant
 
struct  not_equal_functor
 
struct  not_functor
 
struct  null_type
 
struct  Oct_basis
 
struct  Oct_smooth_basis
 
struct  Oct_smooth_basis_fun
 
struct  one_fun
 
struct  one_or_zero
 
struct  OuterProduct
 
struct  OuterProduct< T, 1, 1 >
 
struct  Pareto_distribution
 
struct  plain_view_subtype
 
struct  plain_view_subtype< const std::vector< T > >
 
struct  plain_view_subtype< const T * >
 
struct  plain_view_subtype< const T >
 
struct  plain_view_subtype< const thrust::device_vector< T > >
 
struct  plain_view_subtype< const thrust::host_vector< T > >
 
struct  plain_view_subtype< null_type >
 
struct  plain_view_subtype< std::vector< T > >
 
struct  plain_view_subtype< T * >
 
struct  plain_view_subtype< thrust::device_vector< T > >
 
struct  plain_view_subtype< thrust::host_vector< T > >
 
struct  priority_queue
 
struct  r_bit_shift
 
struct  Random
 
struct  reference_subtype
 
struct  reference_subtype< const T * >
 
struct  reference_subtype< null_type >
 
struct  reference_subtype< T * >
 
struct  register_array
 
struct  register_array< Iterator, 16 >
 
struct  register_array< Iterator, 4 >
 
struct  register_array< Iterator, 5 >
 
struct  register_array< Iterator, 8 >
 
struct  runtime_error
 
struct  same_type
 
struct  same_type< T, T >
 
class  ScopedLock
 
struct  ScopedTimer
 
struct  SH_basis
 
class  SharedPointer
 
struct  shift_left
 
struct  shift_right
 
struct  signed_type
 
struct  signed_type< int32 >
 
struct  signed_type< int64 >
 
struct  signed_type< uint32 >
 
struct  signed_type< uint64 >
 
struct  sqr_functor
 
struct  static_min
 
struct  strided_iterator
 
struct  Tensor
 
struct  Tensor< T, 0, N >
 
struct  Tensor< T, 1, N >
 
struct  Tensor< T, 2, N >
 
struct  Tensor< T, 3, N >
 
struct  TensorIndex
 
struct  TensorIndex< 0 >
 
struct  TensorIndex< 1 >
 
struct  TensorIndex< 2 >
 
struct  TensorIndex< 3 >
 
struct  ternary_function_tag
 
struct  TGAHeader
 
class  Thread
 
class  ThreadBase
 
struct  ThreadBaseImpl
 
struct  Timer
 
struct  TimeSeries
 
struct  to_const
 
struct  to_const< const T & >
 
struct  to_const< const T * >
 
struct  to_const< T & >
 
struct  to_const< T * >
 
struct  Transform_generator
 
struct  unary_function_tag
 
struct  Uniform_distribution
 
struct  unsigned_type
 
struct  unsigned_type< int32 >
 
struct  unsigned_type< int64 >
 
struct  unsigned_type< uint32 >
 
struct  unsigned_type< uint64 >
 
struct  Variance_estimator
 
struct  Vector
 
struct  vector
 
struct  vector1_storage
 
struct  vector2_storage
 
struct  vector3_storage
 
struct  vector4_storage
 
struct  vector< device_tag, T, Alloc >
 
struct  vector< host_tag, T, Alloc >
 
struct  Vector< T, 1 >
 
struct  Vector< T, 2 >
 
struct  Vector< T, 3 >
 
struct  Vector< T, 4 >
 
struct  vector_traits
 
struct  vector_traits< char >
 
struct  vector_traits< char2 >
 
struct  vector_traits< char3 >
 
struct  vector_traits< char4 >
 
struct  vector_traits< double >
 
struct  vector_traits< double2 >
 
struct  vector_traits< float >
 
struct  vector_traits< float2 >
 
struct  vector_traits< float3 >
 
struct  vector_traits< float4 >
 
struct  vector_traits< int >
 
struct  vector_traits< int2 >
 
struct  vector_traits< int3 >
 
struct  vector_traits< int4 >
 
struct  vector_traits< int64 >
 
struct  vector_traits< int64_2 >
 
struct  vector_traits< int64_3 >
 
struct  vector_traits< int64_4 >
 
struct  vector_traits< short >
 
struct  vector_traits< short2 >
 
struct  vector_traits< short3 >
 
struct  vector_traits< short4 >
 
struct  vector_traits< uchar2 >
 
struct  vector_traits< uchar3 >
 
struct  vector_traits< uchar4 >
 
struct  vector_traits< uint2 >
 
struct  vector_traits< uint3 >
 
struct  vector_traits< uint4 >
 
struct  vector_traits< uint64 >
 
struct  vector_traits< uint64_2 >
 
struct  vector_traits< uint64_3 >
 
struct  vector_traits< uint64_4 >
 
struct  vector_traits< unsigned char >
 
struct  vector_traits< unsigned int >
 
struct  vector_traits< unsigned short >
 
struct  vector_traits< ushort2 >
 
struct  vector_traits< ushort3 >
 
struct  vector_traits< ushort4 >
 
struct  vector_traits< Vector< T, DIM_T > >
 
struct  vector_type
 
struct  vector_type< char, 1 >
 
struct  vector_type< char, 2 >
 
struct  vector_type< char, 3 >
 
struct  vector_type< char, 4 >
 
struct  vector_type< double, 1 >
 
struct  vector_type< double, 2 >
 
struct  vector_type< double, 3 >
 
struct  vector_type< double, 4 >
 
struct  vector_type< float, 1 >
 
struct  vector_type< float, 2 >
 
struct  vector_type< float, 3 >
 
struct  vector_type< float, 4 >
 
struct  vector_type< int, 1 >
 
struct  vector_type< int, 2 >
 
struct  vector_type< int, 3 >
 
struct  vector_type< int, 4 >
 
struct  vector_type< int64, 1 >
 
struct  vector_type< int64, 2 >
 
struct  vector_type< int64, 3 >
 
struct  vector_type< int64, 4 >
 
struct  vector_type< short, 1 >
 
struct  vector_type< short, 2 >
 
struct  vector_type< short, 3 >
 
struct  vector_type< short, 4 >
 
struct  vector_type< T, 1 >
 
struct  vector_type< T, 2 >
 
struct  vector_type< T, 3 >
 
struct  vector_type< T, 4 >
 
struct  vector_type< uint64, 1 >
 
struct  vector_type< uint64, 2 >
 
struct  vector_type< uint64, 3 >
 
struct  vector_type< uint64, 4 >
 
struct  vector_type< unsigned char, 1 >
 
struct  vector_type< unsigned char, 2 >
 
struct  vector_type< unsigned char, 3 >
 
struct  vector_type< unsigned char, 4 >
 
struct  vector_type< unsigned int, 1 >
 
struct  vector_type< unsigned int, 2 >
 
struct  vector_type< unsigned int, 3 >
 
struct  vector_type< unsigned int, 4 >
 
struct  vector_type< unsigned short, 1 >
 
struct  vector_type< unsigned short, 2 >
 
struct  vector_type< unsigned short, 3 >
 
struct  vector_type< unsigned short, 4 >
 
struct  vector_view
 
class  WeakPointer
 
class  Weyl_sampler
 
class  Weyl_sampler_opt
 
class  WorkQueue
 
struct  ZH_rotation
 
struct  ZH_rotation< 0 >
 

Typedefs

typedef AtomicInt< int > AtomicInt32
 
typedef AtomicInt< int64 > AtomicInt64
 
typedef std::input_iterator_tag input_host_iterator_tag
 
typedef std::output_iterator_tag output_host_iterator_tag
 
typedef std::forward_iterator_tag forward_host_iterator_tag
 
typedef std::bidirectional_iterator_tag bidirectional_host_iterator_tag
 
typedef std::random_access_iterator_tag random_access_host_iterator_tag
 
typedef thrust::input_device_iterator_tag input_device_iterator_tag
 
typedef thrust::output_device_iterator_tag output_device_iterator_tag
 
typedef thrust::forward_device_iterator_tag forward_device_iterator_tag
 
typedef thrust::bidirectional_device_iterator_tag bidirectional_device_iterator_tag
 
typedef thrust::random_access_device_iterator_tag random_access_device_iterator_tag
 
typedef thrust::input_universal_iterator_tag input_universal_iterator_tag
 
typedef thrust::output_universal_iterator_tag output_universal_iterator_tag
 
typedef thrust::forward_universal_iterator_tag forward_universal_iterator_tag
 
typedef thrust::bidirectional_universal_iterator_tag bidirectional_universal_iterator_tag
 
typedef thrust::random_access_universal_iterator_tag random_access_universal_iterator_tag
 
typedef uchar2 uint8_2
 
typedef uchar3 uint8_3
 
typedef uchar4 uint8_4
 
typedef char2 int8_2
 
typedef char3 int8_3
 
typedef char4 int8_4
 
typedef ushort2 uint16_2
 
typedef ushort3 uint16_3
 
typedef ushort4 uint16_4
 
typedef short2 int16_2
 
typedef short3 int16_3
 
typedef short4 int16_4
 
typedef uint2 uint32_2
 
typedef uint3 uint32_3
 
typedef uint4 uint32_4
 
typedef int2 int32_2
 
typedef int3 int32_3
 
typedef int4 int32_4
 
typedef ulonglong2 uint64_2
 
typedef ulonglong3 uint64_3
 
typedef ulonglong4 uint64_4
 
typedef longlong2 int64_2
 
typedef longlong3 int64_3
 
typedef longlong4 int64_4
 
typedef long CounterT_default
 
typedef unsigned long long uint64
 
typedef unsigned int uint32
 
typedef unsigned short uint16
 
typedef unsigned char uint8
 
typedef long long int64
 
typedef int int32
 
typedef short int16
 
typedef signed char int8
 
typedef Bbox< Vector2fBbox2f
 
typedef Bbox< Vector3fBbox3f
 
typedef Bbox< Vector4fBbox4f
 
typedef Bbox< Vector2dBbox2d
 
typedef Bbox< Vector3dBbox3d
 
typedef Bbox< Vector4dBbox4d
 
typedef Bbox< Vector2iBbox2i
 
typedef Bbox< Vector3iBbox3i
 
typedef Bbox< Vector4iBbox4i
 
typedef Bbox< Vector2uBbox2u
 
typedef Bbox< Vector3uBbox3u
 
typedef Bbox< Vector4uBbox4u
 
typedef Matrix< float, 2, 2 > Matrix2x2f
 
typedef Matrix< double, 2, 2 > Matrix2x2d
 
typedef Matrix< float, 3, 3 > Matrix3x3f
 
typedef Matrix< double, 3, 3 > Matrix3x3d
 
typedef Matrix< float, 4, 4 > Matrix4x4f
 
typedef Matrix< double, 4, 4 > Matrix4x4d
 
typedef Matrix< float, 2, 3 > Matrix2x3f
 
typedef Matrix< float, 3, 2 > Matrix3x2f
 
typedef Matrix< double, 2, 3 > Matrix2x3d
 
typedef Matrix< double, 3, 2 > Matrix3x2d
 
typedef OuterProduct< float, 2, 2 > OuterProduct2x2f
 
typedef OuterProduct< float, 3, 3 > OuterProduct3x3f
 
typedef OuterProduct< float, 4, 4 > OuterProduct4x4f
 
typedef OuterProduct< float, 2, 3 > OuterProduct2x3f
 
typedef OuterProduct< float, 3, 2 > OuterProduct3x2f
 
typedef OuterProduct< double, 2, 2 > OuterProduct2x2d
 
typedef OuterProduct< double, 3, 3 > OuterProduct3x3d
 
typedef OuterProduct< double, 4, 4 > OuterProduct4x4d
 
typedef OuterProduct< double, 2, 3 > OuterProduct2x3d
 
typedef OuterProduct< double, 3, 2 > OuterProduct3x2d
 
typedef Vector< float, 2 > Vector2f
 
typedef Vector< float, 3 > Vector3f
 
typedef Vector< float, 4 > Vector4f
 
typedef Vector< double, 2 > Vector2d
 
typedef Vector< double, 3 > Vector3d
 
typedef Vector< double, 4 > Vector4d
 
typedef Vector< int, 2 > Vector2i
 
typedef Vector< int, 3 > Vector3i
 
typedef Vector< int, 4 > Vector4i
 
typedef Vector< uint32, 2 > Vector2u
 
typedef Vector< uint32, 3 > Vector3u
 
typedef Vector< uint32, 4 > Vector4u
 

Enumerations

enum  block_strided_layout { ROW_MAJOR_LAYOUT = 0u, COLUMN_MAJOR_LAYOUT = 1u }
 
enum  SphericalMeasure { kSolidAngle = 0, kProjectedSolidAngle = 1 }
 
enum  TGAPixels { RGB = 0, BGR = 1, RGBA = 2, BW = 3 }
 

Functions

template<typename VT , uint32 O>
CUGAR_HOST_DEVICE void set_primary (diff_var< VT, 1, O > &var, const VT deriv=VT(1.0))
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE void set_primary (const uint32 i, diff_var< VT, N, O > &var, const VT deriv=VT(1.0))
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > decrease_order (const diff_var< VT, N, 1 > &op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O-1 > decrease_order (const diff_var< VT, N, O > &op)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 1 > raise_order (const diff_var< VT, N, 0 > &op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O+1 > raise_order (const diff_var< VT, N, O > &op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Vector< diff_var< VT, N, O+1 >, N > raise_order (const Vector< diff_var< VT, N, O >, N > &op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Tensor< diff_var< VT, N, O+1 >, 1, N > raise_order (const Tensor< diff_var< VT, N, O >, 1, N > &op)
 
template<typename VT , uint32 N, uint32 O, uint32 TO>
CUGAR_HOST_DEVICE Tensor< diff_var< VT, N, O+1 >, TO, N > raise_order (const Tensor< diff_var< VT, N, O >, TO, N > &op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O >::diff_type diff (const diff_var< VT, N, O > op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Tensor< diff_var< VT, N, O-2 >, 2, N > diff_hessian (const diff_var< VT, N, O > op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Tensor< VT, 1, N > gradient (const diff_var< VT, N, O > op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Tensor< VT, 1, N > jacobian (const diff_var< VT, N, O > op)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Tensor< VT, 2, N > hessian (const diff_var< VT, N, O > op)
 
template<uint32 ORDER, typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE Tensor< VT, ORDER, N > diff_tensor (const diff_var< VT, N, O > op)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator- (const diff_var< VT, N, 0 > a)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator- (const diff_var< VT, N, 0 > a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator- (const diff_var< VT, N, 0 > a, const VT b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator- (const VT a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator+ (const diff_var< VT, N, 0 > a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator+ (const diff_var< VT, N, 0 > a, const VT b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator+ (const VT a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator* (const diff_var< VT, N, 0 > a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator* (const diff_var< VT, N, 0 > a, const VT b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator* (const VT a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator/ (const diff_var< VT, N, 0 > a, const diff_var< VT, N, 0 > b)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > operator/ (const diff_var< VT, N, 0 > a, const VT b)
 
template<typename VT , uint32 N, uint32 O1, uint32 O2>
CUGAR_HOST_DEVICE diff_var< VT, N, detail::dispatch_sum< VT, N, O1, O2 >::RO > operator+ (const diff_var< VT, N, O1 > a, const diff_var< VT, N, O2 > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator+ (const diff_var< VT, N, O > a, const VT b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator+ (const VT a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator- (const diff_var< VT, N, O > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator- (const diff_var< VT, N, O > a, const VT b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator- (const VT a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O1, uint32 O2>
CUGAR_HOST_DEVICE diff_var< VT, N, detail::dispatch_sum< VT, N, O1, O2 >::RO > operator- (const diff_var< VT, N, O1 > a, const diff_var< VT, N, O2 > b)
 
template<typename VT , uint32 N, uint32 O1, uint32 O2>
CUGAR_HOST_DEVICE diff_var< VT, N, detail::dispatch_mul< VT, N, O1, O2 >::RO > operator* (const diff_var< VT, N, O1 > a, const diff_var< VT, N, O2 > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator* (const diff_var< VT, N, O > a, const VT b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator* (const VT a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O1, uint32 O2>
CUGAR_HOST_DEVICE diff_var< VT, N, detail::dispatch_div< VT, N, O1, O2 >::RO > operator/ (const diff_var< VT, N, O1 > a, const diff_var< VT, N, O2 > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator/ (const diff_var< VT, N, O > a, const VT b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > operator/ (const VT a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > & operator+= (diff_var< VT, N, O > &a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > & operator-= (diff_var< VT, N, O > &a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > & operator*= (diff_var< VT, N, O > &a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > & operator/= (diff_var< VT, N, O > &a, const diff_var< VT, N, O > b)
 
template<uint32 N>
CUGAR_HOST_DEVICE diff_var< float, N, 0 > sin (const diff_var< float, N, 0 > a)
 
template<uint32 N>
CUGAR_HOST_DEVICE diff_var< float, N, 0 > cos (const diff_var< float, N, 0 > a)
 
template<uint32 N>
CUGAR_HOST_DEVICE diff_var< float, N, 0 > log (const diff_var< float, N, 0 > a)
 
template<uint32 N>
CUGAR_HOST_DEVICE diff_var< float, N, 0 > exp (const diff_var< float, N, 0 > a)
 
template<uint32 N>
CUGAR_HOST_DEVICE diff_var< float, N, 0 > sqrt (const diff_var< float, N, 0 > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > sin (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > cos (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > log (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > exp (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > sqrt (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > sinf (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > cosf (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > logf (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > expf (const diff_var< float, N, O > a)
 
template<uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< float, N, O > sqrtf (const diff_var< float, N, O > a)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > sin (const diff_var< VT, N, 0 > a)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > cos (const diff_var< VT, N, 0 > a)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > log (const diff_var< VT, N, 0 > a)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > exp (const diff_var< VT, N, 0 > a)
 
template<typename VT , uint32 N>
CUGAR_HOST_DEVICE diff_var< VT, N, 0 > sqrt (const diff_var< VT, N, 0 > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > sin (const diff_var< VT, N, O > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > cos (const diff_var< VT, N, O > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > log (const diff_var< VT, N, O > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > exp (const diff_var< VT, N, O > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > sqrt (const diff_var< VT, N, O > a)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > max (const diff_var< VT, N, O > a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE diff_var< VT, N, O > min (const diff_var< VT, N, O > a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE bool operator< (const diff_var< VT, N, O > a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE bool operator<= (const diff_var< VT, N, O > a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE bool operator> (const diff_var< VT, N, O > a, const diff_var< VT, N, O > b)
 
template<typename VT , uint32 N, uint32 O>
CUGAR_HOST_DEVICE bool operator>= (const diff_var< VT, N, O > a, const diff_var< VT, N, O > b)
 
void diff_test ()
 
template<typename Basis_type , typename Fun_type >
void project (const Basis_type basis, const Fun_type &fun, const float a, const float b, const int32 n_samples, float *coeffs)
 
template<typename Iterator , typename Predicate >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator find_pivot (Iterator begin, const uint32 n, const Predicate predicate)
 
template<typename Iterator , typename Value , typename index_type >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator lower_bound (const Value x, Iterator begin, const index_type n)
 
template<typename Iterator , typename Value , typename index_type >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Iterator upper_bound (const Value x, Iterator begin, const index_type n)
 
template<typename Iterator , typename Value , typename index_type >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE index_type lower_bound_index (const Value x, Iterator begin, const index_type n)
 
template<typename Iterator , typename Value , typename index_type >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE index_type upper_bound_index (const Value x, Iterator begin, const index_type n)
 
template<typename input_iterator1 , typename input_iterator2 , typename output_iterator >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void merge (input_iterator1 first1, input_iterator1 end1, input_iterator2 first2, input_iterator2 end2, output_iterator output)
 
template<typename key_iterator1 , typename key_iterator2 , typename value_iterator1 , typename value_iterator2 , typename key_iterator , typename value_iterator >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void merge_by_key (key_iterator1 first1, key_iterator1 end1, key_iterator2 first2, key_iterator2 end2, value_iterator1 values1, value_iterator2 values2, key_iterator output_keys, value_iterator output_values)
 
void host_release_fence ()
 
void host_acquire_fence ()
 
int32 host_atomic_add (int32 *value, const int32 op)
 
uint32 host_atomic_add (uint32 *value, const uint32 op)
 
int64 host_atomic_add (int64 *value, const int64 op)
 
uint64 host_atomic_add (uint64 *value, const uint64 op)
 
int32 host_atomic_sub (int32 *value, const int32 op)
 
uint32 host_atomic_sub (uint32 *value, const uint32 op)
 
int64 host_atomic_sub (int64 *value, const int64 op)
 
uint64 host_atomic_sub (uint64 *value, const uint64 op)
 
uint32 host_atomic_or (uint32 *value, const uint32 op)
 
uint64 host_atomic_or (uint64 *value, const uint64 op)
 
CUGAR_API float host_atomic_add (float *value, const float op)
 
CUGAR_API int32 host_atomic_increment (int32 *value)
 
CUGAR_API int64 host_atomic_increment (int64 *value)
 
CUGAR_API int32 host_atomic_decrement (int32 *value)
 
CUGAR_API int64 host_atomic_decrement (int64 *value)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float atomic_add (float *value, const float op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 atomic_add (int32 *value, const int32 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 atomic_add (uint32 *value, const uint32 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 atomic_add (uint64 *value, const uint64 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 atomic_sub (int32 *value, const int32 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 atomic_sub (uint32 *value, const uint32 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 atomic_or (uint32 *value, const uint32 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 atomic_or (uint64 *value, const uint64 op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 atomic_increment (int32 *value)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int64 atomic_increment (int64 *value)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 atomic_decrement (int32 *value)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int64 atomic_decrement (int64 *value)
 
template<typename F , typename C >
binder1st< F, C > bind1st (const F &f, const C c)
 
template<typename F , typename C >
binder2nd< F, C > bind2nd (const F &f, const C c)
 
template<typename F1 , typename F2 >
composition_type< F1, F2, typename F1::function_tag, typename F2::function_tag >::type compose (const F1 f1, const F2 f2)
 
template<typename F , typename G1 , typename G2 >
compose_binary< F, G1, G2 > compose (const F f, const G1 g1, const G2 g2)
 
template<typename Iterator >
gather_functor< Iterator > make_gather_functor (const Iterator perm)
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float float_infinity ()
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE double double_infinity ()
 
template<uint32 N>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 lo_bits ()
 
template<uint32 N>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 hi_bits ()
 
template<typename Iterator , typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 count_occurrences (const Iterator begin, uint32 size, const T val, const uint32 max_occ=uint32(-1))
 
template<typename L , typename R >
CUGAR_HOST_DEVICE L divide_ri (const L x, const R y)
 
template<typename L , typename R >
CUGAR_HOST_DEVICE L divide_rz (const L x, const R y)
 
template<typename L , typename R >
CUGAR_HOST_DEVICE L round_i (const L x, const R y)
 
template<typename L , typename R >
CUGAR_HOST_DEVICE L round_z (const L x, const R y)
 
template<typename L , typename R >
CUGAR_HOST_DEVICE L round (const L x, const R y)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 comp (const uchar2 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char comp (const char2 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 comp (const uchar4 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE char comp (const char4 a, const char c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 comp (const uint2 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void set (uint2 &a, const uint32 c, const uint32 v)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 comp (const ulonglong2 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void set (ulonglong2 &a, const uint32 c, const uint64 v)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 comp (const int2 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 comp (const uint4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void set (uint4 &a, const uint32 c, const uint32 v)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 comp (const int4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint16 comp (const ushort4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 comp (const ulonglong4 a, const uint32 c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void set (ulonglong4 &a, const uint32 c, const uint64 v)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE vector_type< T, 1 >::type make_vector (const T i1)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE vector_type< T, 2 >::type make_vector (const T i1, const T i2)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE vector_type< T, 3 >::type make_vector (const T i1, const T i2, const T i3)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE vector_type< T, 4 >::type make_vector (const T i1, const T i2, const T i3, const T i4)
 
template<typename T >
CUGAR_HOST_DEVICE T sgn (const T x)
 
CUGAR_HOST_DEVICE float round (const float x)
 
CUGAR_HOST_DEVICE int32 abs (const int32 a)
 
CUGAR_HOST_DEVICE int64 abs (const int64 a)
 
CUGAR_HOST_DEVICE float abs (const float a)
 
CUGAR_HOST_DEVICE double abs (const double a)
 
CUGAR_HOST_DEVICE float min (const float a, const float b)
 
CUGAR_HOST_DEVICE float max (const float a, const float b)
 
CUGAR_HOST_DEVICE int8 min (const int8 a, const int8 b)
 
CUGAR_HOST_DEVICE int8 max (const int8 a, const int8 b)
 
CUGAR_HOST_DEVICE uint8 min (const uint8 a, const uint8 b)
 
CUGAR_HOST_DEVICE uint8 max (const uint8 a, const uint8 b)
 
CUGAR_HOST_DEVICE uint16 min (const uint16 a, const uint16 b)
 
CUGAR_HOST_DEVICE uint16 max (const uint16 a, const uint16 b)
 
CUGAR_HOST_DEVICE int32 min (const int32 a, const int32 b)
 
CUGAR_HOST_DEVICE int32 max (const int32 a, const int32 b)
 
CUGAR_HOST_DEVICE uint32 min (const uint32 a, const uint32 b)
 
CUGAR_HOST_DEVICE uint32 max (const uint32 a, const uint32 b)
 
CUGAR_HOST_DEVICE int64 min (const int64 a, const int64 b)
 
CUGAR_HOST_DEVICE int64 max (const int64 a, const int64 b)
 
CUGAR_HOST_DEVICE uint64 min (const uint64 a, const uint64 b)
 
CUGAR_HOST_DEVICE uint64 max (const uint64 a, const uint64 b)
 
CUGAR_HOST_DEVICE uint32 quantize (const float x, const uint32 n)
 
float CUGAR_HOST_DEVICE mod (const float x, const float m)
 
float CUGAR_HOST_DEVICE sqr (const float x)
 
double CUGAR_HOST_DEVICE sqr (const double x)
 
CUGAR_HOST_DEVICE uint32 log2 (uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float saturate (const float x)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 hash (uint32 a)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 hash2 (uint32 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 hash (uint64 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 hash2 (uint64 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 hash3 (uint64 key)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float randfloat (unsigned i, unsigned p)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 reverse_bits (const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float radical_inverse (unsigned int n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 radical_inverse (uint64 bits, const uint64 scramble)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 permute (uint32 i, uint32 l, uint32 p)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint8 min3 (const uint8 op1, const uint8 op2, const uint8 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 min3 (const uint32 op1, const uint32 op2, const uint32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 max3 (const uint32 op1, const uint32 op2, const uint32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 min3 (const int32 op1, const int32 op2, const int32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int32 max3 (const int32 op1, const int32 op2, const int32 op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float min3 (const float op1, const float op2, const float op3)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float max3 (const float op1, const float op2, const float op3)
 
CUGAR_HOST_DEVICE float fast_pow (const float a, const float b)
 
CUGAR_HOST_DEVICE float fast_sin (const float x)
 
CUGAR_HOST_DEVICE float fast_cos (const float x)
 
CUGAR_HOST_DEVICE float fast_sqrt (const float x)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void sincosf (float phi, float *s, float *c)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float rsqrtf (float x)
 
template<typename system_tag , typename PredicateIterator >
bool any (const uint32 n, const PredicateIterator pred)
 
template<typename system_tag , typename PredicateIterator >
bool all (const uint32 n, const PredicateIterator pred)
 
template<typename system_tag , typename Iterator >
bool is_sorted (const uint32 n, const Iterator values)
 
template<typename system_tag , typename Iterator , typename Headflags >
bool is_segment_sorted (const uint32 n, const Iterator values, const Headflags flags)
 
template<typename system_tag , typename Iterator , typename Functor >
void for_each (const uint64 n, const Iterator in, Functor functor)
 
template<typename system_tag , typename Iterator , typename Output , typename Functor >
void transform (const uint32 n, const Iterator in, const Output out, const Functor functor)
 
template<typename system_tag , typename Iterator1 , typename Iterator2 , typename Output , typename Functor >
void transform (const uint32 n, const Iterator1 in1, const Iterator2 in2, const Output out, const Functor functor)
 
template<typename system_tag , typename InputIterator , typename BinaryOp >
std::iterator_traits< InputIterator >::value_type reduce (const uint32 n, InputIterator in, BinaryOp op, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename InputIterator , typename OutputIterator , typename BinaryOp >
void inclusive_scan (const uint32 n, InputIterator in, OutputIterator out, BinaryOp op, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename InputIterator , typename OutputIterator , typename BinaryOp , typename Identity >
void exclusive_scan (const uint32 n, InputIterator in, OutputIterator out, BinaryOp op, Identity identity, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename InputIterator , typename FlagsIterator , typename OutputIterator >
uint32 copy_flagged (const uint32 n, InputIterator in, FlagsIterator flags, OutputIterator out, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename InputIterator , typename OutputIterator , typename Predicate >
uint32 copy_if (const uint32 n, InputIterator in, OutputIterator out, const Predicate pred, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename InputIterator , typename OutputIterator , typename CountIterator >
uint32 runlength_encode (const uint32 n, InputIterator in, OutputIterator out, CountIterator counts, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename KeyIterator , typename ValueIterator , typename OutputKeyIterator , typename OutputValueIterator , typename ReductionOp >
uint32 reduce_by_key (const uint32 n, KeyIterator keys_in, ValueIterator values_in, OutputKeyIterator keys_out, OutputValueIterator values_out, ReductionOp reduction_op, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename KeyIterator , typename ValueIterator , typename OutputIterator >
void lower_bound (const uint32 n, ValueIterator values, const uint32 n_keys, KeyIterator keys, OutputIterator indices)
 
template<typename system_tag , typename KeyIterator , typename ValueIterator , typename OutputIterator >
void upper_bound (const uint32 n, ValueIterator values, const uint32 n_keys, KeyIterator keys, OutputIterator indices)
 
template<typename system_tag , typename KeyIterator >
void radix_sort (const uint32 n, KeyIterator keys, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename KeyIterator , typename ValueIterator >
void radix_sort (const uint32 n, KeyIterator keys, ValueIterator values, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename system_tag , typename key_iterator1 , typename key_iterator2 , typename value_iterator1 , typename value_iterator2 , typename key_output , typename value_output >
void merge_by_key (const uint32 A_len, const uint32 B_len, const key_iterator1 A_keys, const key_iterator2 B_keys, const value_iterator1 A_values, const value_iterator2 B_values, key_output C_keys, value_output C_values, cugar::vector< system_tag, uint8 > &temp_storage)
 
template<typename PredicateIterator >
bool any (const host_tag tag, const uint32 n, const PredicateIterator pred)
 
template<typename PredicateIterator >
bool all (const host_tag tag, const uint32 n, const PredicateIterator pred)
 
template<typename T1 , typename T2 >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE is_sorted_iterator< T1, T2 > operator+ (const is_sorted_iterator< T1, T2 > it, const int64 i)
 
template<typename T1 , typename T2 >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int64 operator- (const is_sorted_iterator< T1, T2 > it1, const is_sorted_iterator< T1, T2 > it2)
 
template<typename T1 , typename T2 >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator!= (const is_sorted_iterator< T1, T2 > it1, const is_sorted_iterator< T1, T2 > it2)
 
template<typename T1 , typename T2 >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator== (const is_sorted_iterator< T1, T2 > it1, const is_sorted_iterator< T1, T2 > it2)
 
template<typename T1 , typename T2 , typename H >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE is_segment_sorted_iterator< T1, T2, H > operator+ (const is_segment_sorted_iterator< T1, T2, H > it, const int64 i)
 
template<typename T1 , typename T2 , typename H >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE int64 operator- (const is_segment_sorted_iterator< T1, T2, H > it1, const is_segment_sorted_iterator< T1, T2, H > it2)
 
template<typename T1 , typename T2 , typename H >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator!= (const is_segment_sorted_iterator< T1, T2, H > it1, const is_segment_sorted_iterator< T1, T2, H > it2)
 
template<typename T1 , typename T2 , typename H >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator== (const is_segment_sorted_iterator< T1, T2, H > it1, const is_segment_sorted_iterator< T1, T2, H > it2)
 
template<typename Iterator , typename Functor >
void for_each (const host_tag tag, const uint64 n, const Iterator in, Functor functor)
 
template<typename Iterator , typename Functor >
void for_each (const device_tag tag, const uint64 n, const Iterator in, Functor functor)
 
template<typename Iterator , typename Output , typename Functor >
void transform (const device_tag tag, const uint64 n, const Iterator in, const Output out, const Functor functor)
 
template<typename Iterator , typename Output , typename Functor >
void transform (const host_tag tag, const uint32 n, const Iterator in, const Output out, const Functor functor)
 
template<typename Iterator1 , typename Iterator2 , typename Output , typename Functor >
void transform (const device_tag tag, const uint32 n, const Iterator1 in1, const Iterator2 in2, const Output out, const Functor functor)
 
template<typename Iterator1 , typename Iterator2 , typename Output , typename Functor >
void transform (const host_tag tag, const uint32 n, const Iterator1 in1, const Iterator2 in2, const Output out, const Functor functor)
 
template<typename InputIterator , typename BinaryOp >
std::iterator_traits< InputIterator >::value_type reduce (host_tag tag, const uint32 n, InputIterator in, BinaryOp op, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename InputIterator , typename OutputIterator , typename BinaryOp >
void inclusive_scan (host_tag tag, const uint32 n, InputIterator in, OutputIterator out, BinaryOp op, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename InputIterator , typename OutputIterator , typename BinaryOp , typename Identity >
void exclusive_scan (host_tag tag, const uint32 n, InputIterator in, OutputIterator out, BinaryOp op, Identity identity, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename InputIterator , typename FlagsIterator , typename OutputIterator >
uint32 copy_flagged (const host_tag tag, const uint32 n, InputIterator in, FlagsIterator flags, OutputIterator out, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename InputIterator , typename OutputIterator , typename Predicate >
uint32 copy_if (const host_tag tag, const uint32 n, InputIterator in, OutputIterator out, const Predicate pred, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename InputIterator , typename OutputIterator , typename CountIterator >
uint32 runlength_encode (const host_tag tag, const uint32 n, InputIterator in, OutputIterator out, CountIterator counts, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename KeyIterator , typename ValueIterator , typename OutputKeyIterator , typename OutputValueIterator , typename ReductionOp >
uint32 reduce_by_key (const host_tag tag, const uint32 n, KeyIterator keys_in, ValueIterator values_in, OutputKeyIterator keys_out, OutputValueIterator values_out, ReductionOp reduction_op, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename KeyIterator , typename ValueIterator , typename OutputIterator >
void lower_bound (const device_tag tag, const uint32 n, ValueIterator values, const uint32 n_keys, KeyIterator keys, OutputIterator indices)
 
template<typename KeyIterator , typename ValueIterator , typename OutputIterator >
void lower_bound (const host_tag tag, const uint32 n, ValueIterator values, const uint32 n_keys, KeyIterator keys, OutputIterator indices)
 
template<typename KeyIterator , typename ValueIterator , typename OutputIterator >
void upper_bound (const device_tag tag, const uint32 n, ValueIterator values, const uint32 n_keys, KeyIterator keys, OutputIterator indices)
 
template<typename KeyIterator , typename ValueIterator , typename OutputIterator >
void upper_bound (const host_tag tag, const uint32 n, ValueIterator values, const uint32 n_keys, KeyIterator keys, OutputIterator indices)
 
template<typename KeyIterator >
void radix_sort (const host_tag tag, const uint32 n, KeyIterator keys, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename KeyIterator , typename ValueIterator >
void radix_sort (const host_tag tag, const uint32 n, KeyIterator keys, ValueIterator values, cugar::vector< host_tag, uint8 > &temp_storage)
 
template<typename key_iterator1 , typename key_iterator2 >
CUGAR_HOST_DEVICE uint2 corank (const int32 i, const key_iterator1 A, const int32 m, const key_iterator2 B, const int32 n)
 
template<typename key_iterator1 , typename key_iterator2 , typename value_iterator1 , typename value_iterator2 , typename key_output , typename value_output >
void merge_by_key (const host_tag tag, const uint32 A_len, const uint32 B_len, const key_iterator1 A_keys, const key_iterator2 B_keys, const value_iterator1 A_values, const value_iterator2 B_values, key_output C_keys, value_output C_values)
 
template<typename key_iterator1 , typename key_iterator2 , typename value_iterator1 , typename value_iterator2 , typename key_output , typename value_output >
void merge_by_key (const device_tag tag, const uint32 A_len, const uint32 B_len, const key_iterator1 A_keys, const key_iterator2 B_keys, const value_iterator1 A_values, const value_iterator2 B_values, key_output C_keys, value_output C_values)
 
template<uint32 SIZE, typename iterator_type >
iterator_traits< iterator_type >::reference dynamic_index (const iterator_type &T, const uint32 i)
 
template<typename T , typename CounterT >
void swap (SharedPointer< T, CounterT > &a, SharedPointer< T, CounterT > &b)
 
template<typename T , typename U , typename CounterT >
SharedPointer< T, CounterT > static_pointer_cast (const SharedPointer< U, CounterT > &r)
 
template<typename T , typename U , typename CounterT >
SharedPointer< T, CounterT > const_pointer_cast (const SharedPointer< U, CounterT > &r)
 
template<typename T , typename U , typename CounterT >
SharedPointer< T, CounterT > dynamic_pointer_cast (const SharedPointer< U, CounterT > &r)
 
template<typename CharT , typename TraitsT , typename T , typename CounterT >
std::basic_ostream< CharT, TraitsT > & operator<< (std::basic_ostream< CharT, TraitsT > &os, const SharedPointer< T, CounterT > &p)
 
template<typename DeleterT , typename T , typename CounterT >
DeleterT * get_deleter (const SharedPointer< T, CounterT > &p)
 
template<typename T , typename CounterT >
void swap (WeakPointer< T, CounterT > &a, WeakPointer< T, CounterT > &b)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE strided_iterator< T > make_strided_iterator (T it, const uint32 stride)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator== (const strided_iterator< T > it1, const strided_iterator< T > it2)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator!= (const strided_iterator< T > it1, const strided_iterator< T > it2)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator< (const strided_iterator< T > it1, const strided_iterator< T > it2)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator<= (const strided_iterator< T > it1, const strided_iterator< T > it2)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator> (const strided_iterator< T > it1, const strided_iterator< T > it2)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator>= (const strided_iterator< T > it1, const strided_iterator< T > it2)
 
template<uint32 BLOCKSIZE, typename T , block_strided_layout LAYOUT>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator== (const block_strided_iterator< BLOCKSIZE, T, LAYOUT > it1, const block_strided_iterator< BLOCKSIZE, T, LAYOUT > it2)
 
template<uint32 BLOCKSIZE, typename T , block_strided_layout LAYOUT>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator!= (const block_strided_iterator< BLOCKSIZE, T, LAYOUT > it1, const block_strided_iterator< BLOCKSIZE, T, LAYOUT > it2)
 
uint32 num_physical_cores ()
 
uint32 num_logical_cores ()
 
void yield ()
 
uint32 balance_batch_size (uint32 batch_size, uint32 total_count, uint32 thread_count)
 return a number close to batch_size that achieves best threading balance
 
template<typename T >
vector_view< T *, uint64 > plain_view (thrust::device_vector< T > &vec)
 
template<typename T >
vector_view< const T *, uint64 > plain_view (const thrust::device_vector< T > &vec)
 
template<typename T >
vector_view< T *, uint64 > plain_view (thrust::host_vector< T > &vec)
 
template<typename T >
vector_view< const T *, uint64 > plain_view (const thrust::host_vector< T > &vec)
 
template<typename T , typename Alloc >
T * raw_pointer (thrust::device_vector< T, Alloc > &vec)
 
template<typename T , typename Alloc >
const T * raw_pointer (const thrust::device_vector< T, Alloc > &vec)
 
template<typename T >
T * raw_pointer (thrust::host_vector< T > &vec)
 
template<typename T >
const T * raw_pointer (const thrust::host_vector< T > &vec)
 
template<typename T >
thrust::device_vector< T >::iterator begin (thrust::device_vector< T > &vec)
 
template<typename T >
thrust::device_vector< T >::const_iterator begin (const thrust::device_vector< T > &vec)
 
template<typename T >
thrust::host_vector< T >::iterator begin (thrust::host_vector< T > &vec)
 
template<typename T >
thrust::host_vector< T >::const_iterator begin (const thrust::host_vector< T > &vec)
 
template<typename A , typename B >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool equal ()
 
template<typename Out , typename In >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Out binary_cast (const In in)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool is_pow2 (const uint32 C)
 
template<uint32 C>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool is_pow2_static ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 next_power_of_two (uint32 v)
 
template<uint32 N, typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE I align (const I a)
 
template<uint32 N, typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE I align_down (const I a)
 
template<typename vector_type >
void need_space (vector_type &vec, const uint32 size)
 
template<typename T >
device_iterator_type< T >::type device_iterator (const T it)
 
template<typename domain_tag , typename T >
void make_room (vector< domain_tag, T > &vec, const size_t min_size)
 
template<typename T >
const T * raw_pointer (const device_var< T > &var)
 
template<typename T >
T * raw_pointer (device_var< T > &var)
 
template<typename Iterator >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 length (const vector_view< Iterator > &vec)
 
template<typename T >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T raw_pointer (const vector_view< T > &vec)
 
template<typename T , typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T begin (vector_view< T, I > &vec)
 
template<typename T , typename I >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T begin (const vector_view< T, I > &vec)
 
template<typename T >
vector_view< T *, uint64 > plain_view (std::vector< T > &vec)
 
template<typename T >
vector_view< const T *, uint64 > plain_view (const std::vector< T > &vec)
 
template<typename T >
T * raw_pointer (std::vector< T > &vec)
 
template<typename T >
const T * raw_pointer (const std::vector< T > &vec)
 
template<typename T >
T * begin (T *vec)
 
template<typename T >
const T * begin (const T *vec)
 
template<>
struct CUGAR_ALIGN_BEGIN (8) Bintree_node< leaf_range_tag >
 
template<typename bvh_visitor_type >
void check_tree_rec (const uint32 node_id, const uint32 parent_id, const bvh_visitor_type &visitor, const uint32 n_prims, const uint32 max_leaf_size)
 
template<typename node_type , typename leaf_type >
void check_tree (const Bintree_visitor< node_type, leaf_type > &visitor, const uint32 n_prims, const uint32 max_leaf_size=uint32(-1))
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 morton_code (uint32 x, uint32 y)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 morton_code (uint32 x, uint32 y, uint32 z)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 morton_code60 (uint32 _x, uint32 _y)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 morton_code60 (uint32 x, uint32 y, uint32 z)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 popc (const int32 i)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 popc (const uint32 i)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 popc (const uint8 i)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 popc (const uint64 i)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 find_nthbit4 (const uint32 mask, const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 popc4 (const uint32 mask)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 find_nthbit8 (const uint32 mask, const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 ffs (const int32 x)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 lzc (const uint32 x)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 find_nthbit16 (const uint32 mask, const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 find_nthbit (const uint32 mask, const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 find_nthbit (const uint8 mask, const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 find_nthbit (const uint16 mask, const uint32 n)
 
bool bsdf_test (uint32 test_index, const GGXSmithBsdf &bsdf)
 
bool bsdf_test ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f microfacet (const Vector3f V, const Vector3f L, const Vector3f N, const float inv_eta)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f vndf_microfacet (const Vector3f V, const Vector3f L, const Vector3f N, const float inv_eta)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float hvd_ggx_eval (const float2 &inv_alpha, const float nh, const float ht, const float hb)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float3 hvd_ggx_sample (const float2 &samples, const float inv_alpha)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float3 hvd_ggx_sample (const float2 &samples, const float2 &inv_alpha)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float2 hvd_ggx_invert (const float3 H, const float2 inv_alpha)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float3 vndf_ggx_smith_sample (const float2 samples, const float2 alpha, const Vector3f _V)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float2 vndf_ggx_smith_invert (const Vector3f _N, const float2 alpha, const Vector3f _V)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 clip_quad_to_horizon (cugar::Vector3f L[5])
 
template<typename VectorType >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE VectorType fresnel_dielectric (const float cos_theta_i, const float cos_theta_t, const VectorType eta)
 
template<typename VectorType >
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE VectorType fresnel_dielectric_conductor (const float cos_theta, const VectorType eta, const VectorType eta_k)
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float pow5 (const float x)
 
template<typename VectorType >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE VectorType fresnel_schlick (float cos_theta_i, const float eta, const VectorType fresnel_base)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool refraction_angle (const Vector3f w_i, const Vector3f N, const float eta, const float cos_theta_i, float *cos_theta_t)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool refract (const Vector3f w_i, const Vector3f N, const float cos_theta_i, const float eta, Vector3f *out, float *F)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f refract (const Vector3f w_i, const Vector3f N, const float eta, const float cos_theta_i, const float cos_theta_t)
 
float compute_sah_cost (const Bvh< 3 > &bvh, uint32 node_index=0)
 compute SAH cost of a subtree
 
void build_skip_nodes (const Bvh_node *nodes, uint32 *skip_nodes)
 build skip nodes for a tree
 
template<uint32 DIM>
uint32 largest_dim (const Vector< float, DIM > &v)
 
void lbvh_test ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float3 hsv_to_rgb (const HSV in)
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE uint32 to_rgbe (const float r, const float g, const float b)
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE uint32 to_rgbe (const Vector3f rgb)
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE Vector3f from_rgbe (const uint32 rgbe)
 
float * load_pfm (const char *filename, uint32 *xres, uint32 *yres)
 
unsigned char * load_tga (const char *filename, TGAHeader *hdr)
 
bool write_tga (const char *filename, int width, int height, const unsigned char *pixdata, TGAPixels input_type)
 
bool write_tga (const char *filename, int width, int height, const float *pixdata, TGAPixels input_type, bool normalize)
 
CUGAR_HOST_DEVICE float area (const Bbox2f &bbox)
 
CUGAR_HOST_DEVICE float area (const Bbox3f &bbox)
 
template<typename Vector_t >
CUGAR_HOST_DEVICE bool contains (const Bbox< Vector_t > &bbox, const Vector_t &p)
 
template<typename Vector_t >
CUGAR_HOST_DEVICE bool contains (const Bbox< Vector_t > &bbox, const Bbox< Vector_t > &candidate)
 
template<typename Vector_t >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float sq_distance (const Bbox< Vector_t > &bbox, const Vector_t &p)
 
template<typename Vector_t >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE size_t largest_axis (const Bbox< Vector_t > &bbox)
 
template<typename Vector_t >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector_t extents (const Bbox< Vector_t > &bbox)
 
template<typename Vector_t >
uint32 largest_axis (const Bbox< Vector_t > &bbox)
 
template<typename Vector_t >
bool contains (const Bbox< Vector_t > &bbox, const Vector_t &p)
 
template<typename Vector_t >
bool contains (const Bbox< Vector_t > &bbox, const Bbox< Vector_t > &c)
 
template<typename Vector_t >
float sq_distance (const Bbox< Vector_t > &bbox, const Vector_t &p)
 
template<typename T , int N>
Vector< T, N > scale_factor (const Matrix< T, N, N > &A)
 
template<typename T , int N>
bool pivot_partial (Matrix< T, N, N > &A, const Vector< T, N > &S, Vector< T, N > &B)
 
template<typename T , int N>
bool forward_elimination (Matrix< T, N, N > &A, Vector< T, N > &B)
 
template<typename T , int N>
Vector< T, N > back_substitution (Matrix< T, N, N > &A, Vector< T, N > &B)
 
template<typename T , int N>
Vector< T, N > gaussian_elimination (Matrix< T, N, N > A, Vector< T, N > B)
 
template<typename T , int N, int M, int Q>
CUGAR_HOST_DEVICE Matrix< T, N, Q > & multiply (const Matrix< T, N, M > &, const Matrix< T, M, Q > &, Matrix< T, N, Q > &)
 
template<typename T , int N, int M, int Q>
CUGAR_HOST_DEVICE Matrix< T, N, Q > operator* (const Matrix< T, N, M > &, const Matrix< T, M, Q > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Vector< T, M > & multiply (const Vector< T, N > &, const Matrix< T, N, M > &, Vector< T, M > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Vector< T, N > & multiply (const Matrix< T, N, M > &, const Vector< T, M > &, Vector< T, N > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Matrix< T, M, N > transpose (const Matrix< T, N, M > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Matrix< T, M, N > & transpose (const Matrix< T, N, M > &, Matrix< T, M, N > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE bool invert (const Matrix< T, N, M > &, Matrix< T, M, N > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE T det (const Matrix< T, N, M > &)
 
template<typename T >
CUGAR_HOST_DEVICE void cholesky (const Matrix< T, 2, 2 > &, Matrix< T, 2, 2 > &)
 
template<typename T , uint32 N, uint32 M>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, M > outer_product (const Vector< T, N > op1, const Vector< T, M > op2)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > translate (const Vector< T, 3 > &vec)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > scale (const Vector< T, 3 > &vec)
 build a 3d scaling matrix More...
 
template<typename T >
Matrix< T, 4, 4 > perspective (T fovy, T aspect, T zNear, T zFar)
 
template<typename T >
Matrix< T, 4, 4 > look_at (const Vector< T, 3 > &eye, const Vector< T, 3 > &center, const Vector< T, 3 > &up, bool flip_sign=false)
 
template<typename T >
Matrix< T, 4, 4 > inverse_look_at (const Vector< T, 3 > &eye, const Vector< T, 3 > &center, const Vector< T, 3 > &up, bool flip_sign=false)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > rotation_around_X (const T q)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > rotation_around_Y (const T q)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > rotation_around_Z (const T q)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > rotation_around_axis (const T q, const Vector3f &axis)
 
CUGAR_HOST_DEVICE Vector3f ptrans (const Matrix4x4f &m, const Vector3f &v)
 
CUGAR_HOST_DEVICE Vector3f vtrans (const Matrix4x4f &m, const Vector3f &v)
 
CUGAR_HOST_DEVICE Vector2f eigen_values (const Matrix2x2f &m)
 
CUGAR_HOST_DEVICE Vector2f singular_values (const Matrix2x2f &m)
 
CUGAR_HOST_DEVICE void svd (const Matrix2x2f &m, Matrix2x2f &u, Vector2f &s, Matrix2x2f &v)
 
template<typename T , int N, int M>
bool invert (const Matrix< T, N, M > &a, Matrix< T, M, N > &r)
 
template<typename T >
CUGAR_HOST_DEVICE bool invert (const Matrix< T, 2, 2 > &a, Matrix< T, 2, 2 > &r)
 
template<typename T >
CUGAR_HOST_DEVICE bool invert (const Matrix< T, 3, 3 > &a, Matrix< T, 3, 3 > &r)
 
template<typename T >
CUGAR_HOST_DEVICE bool invert (const Matrix< T, 4, 4 > &a, Matrix< T, 4, 4 > &r)
 
template<typename T >
CUGAR_HOST_DEVICE T det (const Matrix< T, 2, 2 > &m)
 
template<typename T >
CUGAR_HOST_DEVICE T det (const Matrix< T, 3, 3 > &m)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE int operator== (const Matrix< T, N, M > &a, const Matrix< T, N, M > &b)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE int operator!= (const Matrix< T, N, M > &a, const Matrix< T, N, M > &b)
 
template<typename T , int N, int M>
CUGAR_API_CS Matrix< T, N, M > CUGAR_HOST_DEVICE operator- (const Matrix< T, N, M > &a)
 
template<typename T , int N, int M>
CUGAR_API_CS Matrix< T, N, M > CUGAR_HOST_DEVICE operator+ (const Matrix< T, N, M > &a, const Matrix< T, N, M > &b)
 
template<typename T , int N, int M>
CUGAR_API_CS Matrix< T, N, M > CUGAR_HOST_DEVICE operator- (const Matrix< T, N, M > &a, const Matrix< T, N, M > &b)
 
template<typename T , int N, int M, int Q>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, Q > operator* (const Matrix< T, N, M > &a, const Matrix< T, M, Q > &b)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, M > operator* (const Matrix< T, N, M > &a, T k)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, M > operator* (T k, const Matrix< T, N, M > &a)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE Vector< T, M > operator* (const Vector< T, N > &v, const Matrix< T, N, M > &m)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE Vector< T, N > operator* (const Matrix< T, N, M > &m, const Vector< T, M > &v)
 
template<typename T , int N, int M>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, M > operator/ (const Matrix< T, N, M > &a, T k)
 
template<typename T , int N>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, N > operator+ (const Matrix< T, N, N > &a, const Vector< T, N > &b)
 
template<typename T , int N>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, N > operator+ (const Vector< T, N > &a, const Matrix< T, N, N > &b)
 
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix2x2f outer_product (const Vector2f op1, const Vector2f op2)
 
CUGAR_API_CS CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float outer_product (const float op1, const float op2)
 
template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 0, N > outer_product (const Tensor< T, 0, N > op1, const Tensor< T, 0, N > op2)
 
template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 1, N > outer_product (const Tensor< T, 1, N > op1, const T op2)
 
template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 1, N > outer_product (const T op1, const Tensor< T, 1, N > op2)
 
template<typename T , uint32 D1, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D1, N > outer_product (const Tensor< T, D1, N > op1, const T op2)
 
template<typename T , uint32 D2, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D2, N > outer_product (const T op1, const Tensor< T, D2, N > op2)
 
template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 2, N > outer_product (const Tensor< T, 1, N > op1, const Tensor< T, 1, N > op2)
 
template<typename T , uint32 D2, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D2+1, N > outer_product (const Tensor< T, 1, N > op1, const Tensor< T, D2, N > op2)
 
template<typename T , uint32 N, uint32 D1>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 3, N > outer_product (const Tensor< T, D1, N > op1, const Tensor< T, 1, N > op2)
 
template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 1, N > operator* (const T op1, const Tensor< T, 1, N > op2)
 
template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, 1, N > operator* (const Tensor< T, 1, N > op1, const T op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator* (const Tensor< T, D, N > op1, const T op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator* (const T op1, const Tensor< T, D, N > op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator* (const Tensor< T, D, N > op1, const Tensor< T, 0, N > op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator* (const Tensor< T, 0, N > op1, const Tensor< T, D, N > op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator+ (const Tensor< T, D, N > op1, const Tensor< T, D, N > op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator- (const Tensor< T, D, N > op1, const Tensor< T, D, N > op2)
 
template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor< T, D, N > operator/ (const Tensor< T, D, N > op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator- (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator+ (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > & operator+= (Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator- (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > & operator-= (Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator* (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > & operator*= (Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator* (const T op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator* (const Vector< T, DIM > &op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > & operator*= (Vector< T, DIM > &op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator/ (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > & operator/= (Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > operator/ (const Vector< T, DIM > &op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > & operator/= (Vector< T, DIM > &op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > min (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > max (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > min (const Vector< T, DIM > &op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > max (const Vector< T, DIM > &op1, const T op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool any (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool all (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator== (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator!= (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator< (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator<= (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator> (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool operator>= (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T dot (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T square_length (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T length (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > normalize (const Vector< T, DIM > &op)
 
template<typename T >
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE Vector< T, 3u > cross (const Vector< T, 3u > &op1, const Vector< T, 3u > &op2)
 
template<typename T >
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE Vector< T, 3 > reflect (const Vector< T, 3 > I, const Vector< T, 3 > N)
 
template<typename T >
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE Vector< T, 3 > faceforward (const Vector< T, 3 > N, const Vector< T, 3 > I)
 
template<typename T >
CUGAR_HOST_DEVICE Vector< T, 3 > orthogonal (const Vector< T, 3 > v)
 
template<typename T >
CUGAR_HOST_DEVICE uint32 pack_vector (const Vector< T, 2 > v, const uint32 n_bits_comp)
 
template<typename T >
CUGAR_HOST_DEVICE Vector< T, 2 > unpack_vector (const uint32 u, const uint32 n_bits_comp)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > mod (const Vector< T, DIM > &op, const T m)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T max_comp (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T min_comp (const Vector< T, DIM > &op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float max_comp (const Vector3f &op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float min_comp (const Vector3f &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool is_finite (const Vector< T, DIM > &op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool is_finite (const Vector3f &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > abs (const Vector< T, DIM > &op)
 
template<typename T >
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE Vector< T, 3 > refract (const Vector< T, 3 > I, const Vector< T, 3 > N, const float eta)
 
template<typename T >
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE Vector< T, 3 > refraction_normal (const Vector< T, 3 > I, const Vector< T, 3 > T, const float eta)
 
template<typename T >
CUGAR_HOST_DEVICE void orthonormal_basis (const Vector< T, 3 > normal, Vector< T, 3 > &tangent, Vector< T, 3 > &bitangent)
 
CUGAR_HOST_DEVICE CUGAR_FORCEINLINE void orthonormal_basis (const Vector3f normal, Vector3f &tangent, Vector3f &bitangent)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > sqrt (const Vector< T, DIM > &op)
 
template<uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< float, DIM > sqrt (const Vector< float, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T L1_norm (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T L2_norm (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T L_inf_norm (const Vector< T, DIM > &op)
 
template<typename T , uint32 DIM, uint32 p>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T L_norm (const Vector< T, DIM > &op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float L1_norm (const float op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE double L1_norm (const double op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float L2_norm (const float op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE double L2_norm (const double op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float L_inf_norm (const float op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE double L_inf_norm (const double op)
 
template<uint32 p>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float L_norm (const float op)
 
template<uint32 p>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE double L_norm (const double op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE T average (const Vector< T, DIM > &op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float average (const float op)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE double average (const double op)
 
template<typename T , uint32 DIM>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector< T, DIM > lerp (const Vector< T, DIM > &op1, const Vector< T, DIM > &op2, const T u)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float lerp (const float op1, const float op2, const float u)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE double lerp (const double op1, const double op2, const double u)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f encode_normal (Vector3f N)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f decode_normal (Vector3f N)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 float_to_uint (const float f, const uint32 n)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 float3_to_r10g10b10 (float3 unpackedInput)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float3 r10g10b10_to_float3 (uint32 packedInput)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 pack_normal (Vector3f N)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Vector3f unpack_normal (uint32 Ni)
 
template<typename Tree_writer , typename Integer >
void generate_radix_tree (const uint32 n_codes, const Integer *codes, const uint32 bits, const uint32 max_leaf_size, const bool keep_singletons, const bool middle_splits, Tree_writer &tree)
 
template<typename Tree , typename Integer >
void generate_radix_tree (const uint32 n_codes, const Integer *codes, const uint32 bits, const uint32 max_leaf_size, const bool keep_singletons, const bool middle_splits, Tree &tree)
 
template<uint32 N, uint32 NCOMPONENTS>
CUGAR_HOST_DEVICE void EM (Mixture< Gaussian_distribution_2d, NCOMPONENTS > &mixture, const float eta, const Vector2f *x, const float *w)
 
template<uint32 NCOMPONENTS>
CUGAR_HOST_DEVICE void joint_entropy_EM (Mixture< Gaussian_distribution_2d, NCOMPONENTS > &mixture, const float eta, const Vector2f x, const float w=1.0f)
 
template<uint32 NCOMPONENTS>
CUGAR_HOST_DEVICE void joint_entropy_EM (Mixture< Gaussian_distribution_2d, NCOMPONENTS > &mixture, const float eta, const uint32 N, const Vector2f *x, const float *w)
 
template<uint32 NCOMPONENTS>
CUGAR_HOST_DEVICE void stepwise_E (Mixture< Gaussian_distribution_2d, NCOMPONENTS > &mixture, const float eta, const Vector2f x, const float w, Matrix< float, NCOMPONENTS, 8 > &u)
 
template<uint32 NCOMPONENTS>
CUGAR_HOST_DEVICE void stepwise_M (Mixture< Gaussian_distribution_2d, NCOMPONENTS > &mixture, const Matrix< float, NCOMPONENTS, 8 > &u, const uint32 N)
 
bool em_test ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float2 correlated_multijitter (uint32 s, const uint32 m, const uint32 n, const uint32 p, bool ordered=false)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float3 correlated_multijitter_3d (uint32 s, const uint32 X, const uint32 Y, const uint32 Z, const uint32 p)
 
template<typename Generator , uint32 DIM>
Vector< float, DIM > brownian_bridge (const uint32 L, const uint32 t, Generator gaussian)
 
template<uint32 DIM, typename Distribution , typename Sampler_type >
Vector< float, DIM > generate_point (Sampler_type &sampler, Distribution &gaussian)
 
template<uint32 DIM, typename Sequence , typename Distribution >
Vector< float, DIM > brownian_bridge (Distribution &gaussian, const float sigma, const uint32 N, const uint32 i, const uint32 L, const uint32 t, const Sequence &sequence)
 
CUGAR_HOST CUGAR_DEVICE Vector3f from_spherical_coords (const Vector2f &uv)
 
CUGAR_HOST CUGAR_DEVICE Vector2f to_spherical_coords (const Vector3f &vec)
 
CUGAR_HOST CUGAR_DEVICE Vector2f square_to_unit_disk (const Vector2f uv)
 
CUGAR_HOST CUGAR_DEVICE Vector2f unit_disk_to_square (const Vector2f disk)
 
CUGAR_HOST CUGAR_DEVICE Vector3f square_to_cosine_hemisphere (const Vector2f &uv)
 
CUGAR_HOST CUGAR_DEVICE Vector2f cosine_hemisphere_to_square (const Vector3f &dir)
 
CUGAR_HOST CUGAR_DEVICE Vector3f uniform_square_to_sphere (const Vector2f &uv)
 
CUGAR_HOST CUGAR_DEVICE Vector2f uniform_sphere_to_square (const Vector3f &vec)
 
CUGAR_HOST CUGAR_DEVICE Vector2f hemisphere_to_hemioct (Vector3f v)
 
CUGAR_HOST CUGAR_DEVICE Vector3f hemioct_to_hemisphere (Vector2f e)
 
CUGAR_HOST CUGAR_DEVICE Vector2f sphere_to_oct (Vector3f v)
 
CUGAR_HOST CUGAR_DEVICE Vector3f oct_to_sphere (Vector2f e)
 
CUGAR_HOST CUGAR_DEVICE Vector3f square_to_uniform_hemisphere (const Vector2f &uv)
 
CUGAR_HOST CUGAR_DEVICE Vector2f uniform_hemisphere_to_square (const Vector3f &dir)
 
CUGAR_HOST CUGAR_DEVICE Vector2f signNotZero (Vector2f v)
 
CUGAR_API CUGAR_HOST_DEVICE float oct_basis (const int32 i, const Vector3f &d)
 
CUGAR_API CUGAR_HOST_DEVICE float oct_smooth_basis (const int32 i, const Vector3f &omega)
 
template<typename Vector3 >
CUGAR_HOST_DEVICE float sh (const int32 l, const int32 m, const Vector3 &v)
 
template<int32 l, typename Vector3 >
CUGAR_HOST_DEVICE float sh (const int32 m, const Vector3 &v)
 
template<int32 l, int32 m, typename Vector3 >
CUGAR_HOST_DEVICE float sh (const Vector3 &v)
 
template<typename ZHVector , typename SHVector , typename Vector3 >
CUGAR_HOST_DEVICE void rotate_ZH (const int32 L, const ZHVector &zh_coeff, const Vector3 &d, SHVector &sh_coeff)
 
template<int32 L, typename ZHVector , typename SHVector , typename Vector3 >
CUGAR_HOST_DEVICE void rotate_ZH (const ZHVector &zh_coeff, const Vector3 &d, SHVector &sh_coeff)
 
template<int32 l, int32 m, typename Vector3 >
CUGAR_HOST_DEVICE float rotate_ZH (const float zh_l, const Vector3 &d)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float sh_legendre_polynomial (const uint32 l, const uint32 m, const float x, const float y)
 
template<typename OutputIterator >
CUGAR_HOST_DEVICE void sh_legendre_integrals (const uint32 n, const float x, OutputIterator r)
 
CUGAR_HOST_DEVICE float sh_polar_integral (const int32 m, const float phi)
 
template<typename Tree_visitor , typename Input_iterator , typename Output_iterator , typename Operator , typename Value_type >
void tree_reduce (const Tree_visitor tree, const Input_iterator in_values, Output_iterator node_values, const Operator op, const Value_type def_value)
 
template<typename Tree_visitor , typename Value_iterator , typename Operator >
void tree_reduce (const Tree_visitor tree, Value_iterator values, const Operator op)
 

Detailed Description

Define a vector_view POD type and plain_view() for std::vector.

.h

Function Documentation

◆ begin() [1/4]

template<typename T >
thrust::device_vector<T>::iterator cugar::begin ( thrust::device_vector< T > &  vec)

return the begin iterator of a device vector

◆ begin() [2/4]

template<typename T >
thrust::device_vector<T>::const_iterator cugar::begin ( const thrust::device_vector< T > &  vec)

return the begin iterator of a device vector

◆ begin() [3/4]

template<typename T >
thrust::host_vector<T>::iterator cugar::begin ( thrust::host_vector< T > &  vec)

return the begin iterator of a host vector

◆ begin() [4/4]

template<typename T >
thrust::host_vector<T>::const_iterator cugar::begin ( const thrust::host_vector< T > &  vec)

return the begin iterator of a host vector

◆ device_iterator()

template<typename T >
device_iterator_type<T>::type cugar::device_iterator ( const T  it)

a convenience function to wrap naked device pointers as thrust::device_ptr

◆ operator*() [1/6]

template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,1,N> cugar::operator* ( const T  op1,
const Tensor< T, 1, N >  op2 
)

Multiplication by a constant

◆ operator*() [2/6]

template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,1,N> cugar::operator* ( const Tensor< T, 1, N >  op1,
const T  op2 
)

Multiplication by a constant

◆ operator*() [3/6]

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator* ( const Tensor< T, D, N >  op1,
const T  op2 
)

Multiplication by a constant

◆ operator*() [4/6]

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator* ( const T  op1,
const Tensor< T, D, N >  op2 
)

Multiplication by a constant

◆ operator*() [5/6]

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator* ( const Tensor< T, D, N >  op1,
const Tensor< T, 0, N >  op2 
)

Multiplication by a constant

◆ operator*() [6/6]

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator* ( const Tensor< T, 0, N >  op1,
const Tensor< T, D, N >  op2 
)

Multiplication by a constant

◆ operator+()

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator+ ( const Tensor< T, D, N >  op1,
const Tensor< T, D, N >  op2 
)

Sum of two tensors

◆ operator-()

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator- ( const Tensor< T, D, N >  op1,
const Tensor< T, D, N >  op2 
)

Sum of two tensors

◆ operator/()

template<typename T , uint32 D, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D,N> cugar::operator/ ( const Tensor< T, D, N >  op1,
const T  op2 
)

Division by a constant

◆ outer_product() [1/9]

CUGAR_API_CS CUGAR_HOST_DEVICE CUGAR_FORCEINLINE float cugar::outer_product ( const float  op1,
const float  op2 
)

Outer product of two tensors

◆ outer_product() [2/9]

template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,0,N> cugar::outer_product ( const Tensor< T, 0, N >  op1,
const Tensor< T, 0, N >  op2 
)

Outer product of two tensors

◆ outer_product() [3/9]

template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,1,N> cugar::outer_product ( const Tensor< T, 1, N >  op1,
const T  op2 
)

Outer product of two tensors

◆ outer_product() [4/9]

template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,1,N> cugar::outer_product ( const T  op1,
const Tensor< T, 1, N >  op2 
)

Outer product of two tensors

◆ outer_product() [5/9]

template<typename T , uint32 D1, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D1,N> cugar::outer_product ( const Tensor< T, D1, N >  op1,
const T  op2 
)

Outer product of two tensors

◆ outer_product() [6/9]

template<typename T , uint32 D2, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D2,N> cugar::outer_product ( const T  op1,
const Tensor< T, D2, N >  op2 
)

Outer product of two tensors

◆ outer_product() [7/9]

template<typename T , uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,2,N> cugar::outer_product ( const Tensor< T, 1, N >  op1,
const Tensor< T, 1, N >  op2 
)

Outer product of two tensors

◆ outer_product() [8/9]

template<typename T , uint32 D2, uint32 N>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,D2+1,N> cugar::outer_product ( const Tensor< T, 1, N >  op1,
const Tensor< T, D2, N >  op2 
)

Outer product of two tensors

◆ outer_product() [9/9]

template<typename T , uint32 N, uint32 D1>
CUGAR_API_CS CUGAR_HOST_DEVICE Tensor<T,3,N> cugar::outer_product ( const Tensor< T, D1, N >  op1,
const Tensor< T, 1, N >  op2 
)

Outer product of two tensors

◆ plain_view() [1/4]

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

return the plain view of a device vector

◆ plain_view() [2/4]

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

return the plain view of a device vector

◆ plain_view() [3/4]

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

return the plain view of a device vector

◆ plain_view() [4/4]

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

return the plain view of a device vector

◆ project()

template<typename Basis_type , typename Fun_type >
void cugar::project ( const Basis_type  basis,
const Fun_type &  fun,
const float  a,
const float  b,
const int32  n_samples,
float *  coeffs 
)

Project a spherical function on a given basis. NOTE: the coefficients for the projection are accumulated to the ones passed in.

Parameters
basisthe basis functions
funthe function to project
aa multiplier for the function
ba bias for the function
n_samplesthe number of samples used to evaluate the projection
coeffsthe output coefficients

◆ raw_pointer() [1/6]

template<typename T , typename Alloc >
T* cugar::raw_pointer ( thrust::device_vector< T, Alloc > &  vec)

return the raw pointer of a device vector

◆ raw_pointer() [2/6]

template<typename T , typename Alloc >
const T* cugar::raw_pointer ( const thrust::device_vector< T, Alloc > &  vec)

return the raw pointer of a device vector

◆ raw_pointer() [3/6]

template<typename T >
T* cugar::raw_pointer ( thrust::host_vector< T > &  vec)

return the raw pointer of a device vector

◆ raw_pointer() [4/6]

template<typename T >
const T* cugar::raw_pointer ( const thrust::host_vector< T > &  vec)

return the plain view of a device vector

◆ raw_pointer() [5/6]

template<typename T >
const T* cugar::raw_pointer ( const device_var< T > &  var)

return the plain view of a device_var

◆ raw_pointer() [6/6]

template<typename T >
T* cugar::raw_pointer ( device_var< T > &  var)

return the plain view of a device_var