OpenVDB
12.0.0
|
Namespaces | |
impl | |
Classes | |
struct | conditional |
C++11 implementation of std::conditional. More... | |
struct | conditional< false, TrueT, FalseT > |
Template specialization of conditional. More... | |
struct | disable_if |
struct | disable_if< true, T > |
struct | enable_if |
C++11 implementation of std::enable_if. More... | |
struct | enable_if< true, T > |
struct | is_const |
struct | is_const< const T > |
struct | is_floating_point |
C++11 implementation of std::is_floating_point. More... | |
struct | is_pointer |
Trait used to identify template parameter that are pointers. More... | |
struct | is_pointer< T * > |
Template specialization of pointers. More... | |
struct | is_same |
C++11 implementation of std::is_same. More... | |
struct | is_same< T, T > |
struct | is_same< T0, T1 > |
struct | is_specialization |
Metafunction used to determine if the first template parameter is a specialization of the class template given in the second template parameter. More... | |
struct | is_specialization< TemplateType< Args... >, TemplateType > |
struct | match_const |
Trait used to transfer the const-ness of a reference type to another type. More... | |
struct | match_const< T, const ReferenceT > |
Template specialization used to transfer the const-ness of a reference type to another type. More... | |
class | Range |
class | Range< 1, T > |
class | Range< 2, T > |
class | Range< 3, T > |
struct | remove_const |
Trait use to const from type. Default implementation is just a pass-through. More... | |
struct | remove_const< const T > |
Template specialization of trait class use to remove const qualifier type from a type. More... | |
struct | remove_pointer |
Trait use to remove pointer, i.e. "*", qualifier from a type. Default implementation is just a pass-through. More... | |
struct | remove_pointer< T * > |
Template specialization of trait class use to to remove pointer, i.e. "*", qualifier from a type. More... | |
struct | remove_reference |
Trait use to remove reference, i.e. "&", qualifier from a type. Default implementation is just a pass-through. More... | |
struct | remove_reference< T & > |
Template specialization of trait class use to remove reference, i.e. "&", qualifier from a type. More... | |
class | Split |
class | Timer |
Typedefs | |
using | Range1D = Range< 1, size_t > |
using | Range2D = Range< 2, size_t > |
using | Range3D = Range< 3, size_t > |
Functions | |
template<typename RangeT , typename FuncT > | |
void | forEach (RangeT range, const FuncT &func) |
simple wrapper for tbb::parallel_for with a naive std fallback More... | |
template<typename FuncT > | |
void | forEach (size_t begin, size_t end, size_t grainSize, const FuncT &func) |
Simple wrapper for the function defined above. More... | |
template<template< typename... > class ContainerT, typename... T, typename FuncT > | |
void | forEach (const ContainerT< T... > &c, const FuncT &func) |
Simple wrapper for the function defined above, which works with std::containers. More... | |
template<template< typename... > class ContainerT, typename... T, typename FuncT > | |
void | forEach (const ContainerT< T... > &c, size_t grainSize, const FuncT &func) |
Simple wrapper for the function defined above, which works with std::containers. More... | |
template<typename Func , typename... Rest> | |
int | invoke (const Func &taskFunc1, Rest...taskFuncN) |
template<typename T , typename OpT = std::plus<T>> | |
T | prefixSum (std::vector< T > &vec, bool threaded=true, OpT op=OpT()) |
Computes inclusive prefix sum of a vector. More... | |
template<typename T , typename Op > | |
void | inclusiveScan (T *array, size_t size, const T &identity, bool threaded, Op op) |
An inclusive scan includes in[i] when computing out[i]. More... | |
template<typename RangeT , typename T , typename FuncT , typename JoinT > | |
T | reduce (RangeT range, const T &identity, const FuncT &func, const JoinT &join) |
template<typename T , typename FuncT , typename JoinT > | |
T | reduce (size_t begin, size_t end, size_t grainSize, const T &identity, const FuncT &func, const JoinT &join) |
Simple wrapper to the function defined above. More... | |
template<template< typename... > class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT > | |
T | reduce (const ContainerT< ArgT... > &c, const T &identity, const FuncT &func, const JoinT &join) |
Simple wrapper that works with std::containers. More... | |
template<template< typename... > class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT > | |
T | reduce (const ContainerT< ArgT... > &c, size_t grainSize, const T &identity, const FuncT &func, const JoinT &join) |
Simple wrapper that works with std::containers. More... | |
template<typename T > | |
T && | declval () noexcept |
Minimal implementation of std::declval, which converts any type T to. More... | |
bool | empty (const char *str) |
tests if a c-string str is empty, that is its first value is '\0' More... | |
size_t | strlen (const char *str) |
length of a c-sting, excluding '\0'. More... | |
char * | strcpy (char *dst, const char *src) |
Copy characters from src to dst . More... | |
char * | strncpy (char *dst, const char *src, size_t max) |
Copies the first num characters of src to dst . If the end of the source C string (which is signaled by a null-character) is found before max characters have been copied, dst is padded with zeros until a total of max characters have been written to it. More... | |
char * | strcpy (char *dst, int num, int bas=10) |
converts a number to a string using a specific base More... | |
char * | strcat (char *dst, const char *src) |
Appends a copy of the character string pointed to by src to the end of the character string pointed to by dst on the device. More... | |
char * | strcat (char *dst, int num, int bas=10) |
concatenates a number after a string using a specific base More... | |
int | strcmp (const char *lhs, const char *rhs) |
Compares two null-terminated byte strings lexicographically. More... | |
bool | streq (const char *lhs, const char *rhs) |
Test if two null-terminated byte strings are the same. More... | |
template<typename T , typename... Types> | |
char * | sprint (char *dst, T var1, Types...var2) |
prints a variable number of string and/or numbers to a destination string More... | |
static void * | memzero (void *dst, size_t byteCount) |
Zero initialization of memory. More... | |
static int64_t | PtrDiff (const void *p, const void *q) |
Compute the distance, in bytes, between two pointers, dist = p - q. More... | |
template<typename DstT = void> | |
static DstT * | PtrAdd (void *p, int64_t offset) |
Adds a byte offset to a non-const pointer to produce another non-const pointer. More... | |
template<typename DstT = void> | |
static const DstT * | PtrAdd (const void *p, int64_t offset) |
Adds a byte offset to a const pointer to produce another const pointer. More... | |
uint32_t | findLowestOn (uint32_t v) |
Returns the index of the lowest, i.e. least significant, on bit in the specified 32 bit word. More... | |
uint32_t | findLowestOn (uint64_t v) |
Returns the index of the lowest, i.e. least significant, on bit in the specified 64 bit word. More... | |
uint32_t | findHighestOn (uint32_t v) |
Returns the index of the highest, i.e. most significant, on bit in the specified 32 bit word. More... | |
uint32_t | findHighestOn (uint64_t v) |
Returns the index of the highest, i.e. most significant, on bit in the specified 64 bit word. More... | |
uint32_t | countOn (uint64_t v) |
|
inline |
|
noexcept |
Minimal implementation of std::declval, which converts any type T
to.
a reference type, making it possible to use member functions in the operand of the decltype specifier without the need to go through constructors.
T | Template type to be converted to T&& |
|
inline |
tests if a c-string str
is empty, that is its first value is '\0'
str | c-string to be tested for null termination |
|
inline |
Returns the index of the highest, i.e. most significant, on bit in the specified 32 bit word.
|
inline |
Returns the index of the highest, i.e. most significant, on bit in the specified 64 bit word.
|
inline |
Returns the index of the lowest, i.e. least significant, on bit in the specified 32 bit word.
|
inline |
Returns the index of the lowest, i.e. least significant, on bit in the specified 64 bit word.
|
inline |
simple wrapper for tbb::parallel_for with a naive std fallback
range | Range, CoordBBox, tbb::blocked_range, blocked_range2D, or blocked_range3D. |
func | functor with the signature [](const RangeT&){...}, |
|
inline |
Simple wrapper for the function defined above.
|
inline |
Simple wrapper for the function defined above, which works with std::containers.
|
inline |
Simple wrapper for the function defined above, which works with std::containers.
void nanovdb::util::inclusiveScan | ( | T * | array, |
size_t | size, | ||
const T & | identity, | ||
bool | threaded, | ||
Op | op | ||
) |
An inclusive scan includes in[i] when computing out[i].
int nanovdb::util::invoke | ( | const Func & | taskFunc1, |
Rest... | taskFuncN | ||
) |
|
inlinestatic |
Zero initialization of memory.
dst | pointer to destination |
byteCount | number of bytes to be initialized to zero |
dst
T prefixSum | ( | std::vector< T > & | vec, |
bool | threaded = true , |
||
OpT | op = OpT() |
||
) |
Computes inclusive prefix sum of a vector.
T | Type of the elements in the input/out vector |
OpT | Type of operation performed on each element (defaults to sum) |
vec | input and output vector |
threaded | if true multi-threading is used |
|
inlinestatic |
Adds a byte offset to a non-const pointer to produce another non-const pointer.
DstT | Type of the return pointer (defaults to void) |
p | non-const input pointer, assumed to NOT be NULL |
offset | signed byte offset |
|
inlinestatic |
Adds a byte offset to a const pointer to produce another const pointer.
DstT | Type of the return pointer (defaults to void) |
p | const input pointer, assumed to NOT be NULL |
offset | signed byte offset |
|
inlinestatic |
Compute the distance, in bytes, between two pointers, dist = p - q.
p | fist pointer, assumed to NOT be NULL |
q | second pointer, assumed to NOT be NULL |
|
inline |
range | RangeT can be Range<dim,T>, CoordBBox, tbb::blocked_range, blocked_range2D, or blocked_range3D. |
identity | initial value |
func | functor with signature T FuncT::operator()(const RangeT& range, const T& a) const |
join | functor with the signature T JoinT::operator()(const T& a, const T& b) const std::vector<int> array(100, 1); auto func = [&array](auto &r, int a){for (auto i=r.begin(); i!=r.end(); ++i) a+=array[i]; return a;}; |
|
inline |
Simple wrapper to the function defined above.
|
inline |
Simple wrapper that works with std::containers.
|
inline |
Simple wrapper that works with std::containers.
|
inline |
prints a variable number of string and/or numbers to a destination string
|
inline |
Appends a copy of the character string pointed to by src
to the end of the character string pointed to by dst
on the device.
dst | pointer to the null-terminated byte string to append to. |
src | pointer to the null-terminated byte string to copy from. |
|
inline |
concatenates a number after a string using a specific base
dst | null terminated destination string |
num | signed number to be concatenated after dst |
bas | base used when converting num to a string |
dst
|
inline |
Compares two null-terminated byte strings lexicographically.
lhs | pointer to the null-terminated byte strings to compare |
rhs | pointer to the null-terminated byte strings to compare |
lhs
appears before rhs
in lexicographical order. Zero if lhs
and rhs
compare equal. Positive value if lhs
appears after rhs
in lexicographical order.
|
inline |
Copy characters from src
to dst
.
dst | pointer to the destination string. |
src | pointer to the null-terminated source string. |
dst
.
|
inline |
converts a number to a string using a specific base
dst | destination string |
num | signed number to be concatenated after dst |
bas | base used when converting num to a string |
dst
|
inline |
Test if two null-terminated byte strings are the same.
lhs | pointer to the null-terminated byte strings to compare |
rhs | pointer to the null-terminated byte strings to compare |
|
inline |
length of a c-sting, excluding '\0'.
str | c-string |
|
inline |
Copies the first num characters of src
to dst
. If the end of the source C string (which is signaled by a null-character) is found before max
characters have been copied, dst
is padded with zeros until a total of max
characters have been written to it.
dst | destination string |
src | source string |
max | maximum number of character in destination string |
dst
src
has more characters than max
and the return string needs to be manually null-terminated, i.e. strncpy(dst, src, max)[max-1]='\0'