Loading...
Searching...
No Matches
array.h File Reference
+ Include dependency graph for array.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  VtArray< ELEM >
 Represents an arbitrary dimensional rectangular container class. More...
 

Macros

#define VT_ARRAY_EXTERN_TMPL(unused, elem)    VT_API_TEMPLATE_CLASS(VtArray< VT_TYPE(elem) >);
 
#define VTOPERATOR_CPPARRAY(op, opName)
 
#define VTOPERATOR_CPPSCALAR(op, opName)
 
#define VTOPERATOR_CPPSCALAR_DOUBLE(op, opName)
 

Functions

template<class HashState , class ELEM >
std::enable_if_t< VtIsHashable< ELEM >()> TfHashAppend (HashState &h, VtArray< ELEM > const &array)
 
template<class ELEM >
std::enable_if< VtIsHashable< ELEM >(), size_t >::type hash_value (VtArray< ELEM > const &array)
 
ARCH_PRAGMA_PUSH ARCH_PRAGMA_FORCING_TO_BOOL ARCH_PRAGMA_UNSAFE_USE_OF_BOOL ARCH_PRAGMA_UNARY_MINUS_ON_UNSIGNED VTOPERATOR_CPPARRAY (+, Add)
 
 VTOPERATOR_CPPARRAY (-, Sub)
 
 VTOPERATOR_CPPARRAY (/, Div)
 
 VTOPERATOR_CPPARRAY (%, Mod)
 
template<class T >
VtArray< T > operator- (VtArray< T > const &a)
 

Variables

VTOPERATOR_CPPARRAY * Mul
 

Macro Definition Documentation

◆ VT_ARRAY_EXTERN_TMPL

#define VT_ARRAY_EXTERN_TMPL (   unused,
  elem 
)     VT_API_TEMPLATE_CLASS(VtArray< VT_TYPE(elem) >);

Definition at line 936 of file array.h.

◆ VTOPERATOR_CPPARRAY

#define VTOPERATOR_CPPARRAY (   op,
  opName 
)

Definition at line 994 of file array.h.

◆ VTOPERATOR_CPPSCALAR

#define VTOPERATOR_CPPSCALAR (   op,
  opName 
)
Value:
template<typename T> \
VtArray<T> operator op (T const &scalar, VtArray<T> const &arr) { \
using Op = Vt_ArrayOpHelp<T>; \
VtArray<T> ret(arr.size()); \
std::transform(arr.begin(), arr.end(), ret.begin(), \
[&scalar](T const &aObj) { \
return Op:: opName (scalar, aObj); \
}); \
return ret; \
} \
template<typename T> \
VtArray<T> operator op (VtArray<T> const &arr, T const &scalar) { \
using Op = Vt_ArrayOpHelp<T>; \
VtArray<T> ret(arr.size()); \
std::transform(arr.begin(), arr.end(), ret.begin(), \
[&scalar](T const &aObj) { \
return Op:: opName (aObj, scalar); \
}); \
return ret; \
}
Represents an arbitrary dimensional rectangular container class.
Definition: array.h:228
size_t size() const
Return the total number of elements in this array.
Definition: array.h:489
iterator end()
Returns a non-const iterator to the end of the array.
Definition: array.h:383
iterator begin()
Return a non-const iterator to the start of the array.
Definition: array.h:380

Definition at line 1051 of file array.h.

◆ VTOPERATOR_CPPSCALAR_DOUBLE

#define VTOPERATOR_CPPSCALAR_DOUBLE (   op,
  opName 
)
Value:
template<typename T> \
std::enable_if_t<!std::is_same<T, double>::value, VtArray<T>> \
operator op (double const &scalar, VtArray<T> const &arr) { \
using Op = Vt_ArrayOpHelpScalar<T>; \
VtArray<T> ret(arr.size()); \
std::transform(arr.begin(), arr.end(), ret.begin(), \
[&scalar](T const &aObj) { \
return Op:: opName (scalar, aObj); \
}); \
return ret; \
} \
template<typename T> \
std::enable_if_t<!std::is_same<T, double>::value, VtArray<T>> \
operator op (VtArray<T> const &arr, double const &scalar) { \
using Op = Vt_ArrayOpHelpScalar<T>; \
VtArray<T> ret(arr.size()); \
std::transform(arr.begin(), arr.end(), ret.begin(), \
[&scalar](T const &aObj) { \
return Op:: opName (aObj, scalar); \
}); \
return ret; \
}

Definition at line 1076 of file array.h.

Function Documentation

◆ hash_value()

std::enable_if< VtIsHashable< ELEM >(), size_t >::type hash_value ( VtArray< ELEM > const &  array)

Definition at line 950 of file array.h.

◆ operator-()

VtArray< T > operator- ( VtArray< T > const &  a)

Definition at line 1040 of file array.h.

◆ TfHashAppend()

std::enable_if_t< VtIsHashable< ELEM >()> TfHashAppend ( HashState &  h,
VtArray< ELEM > const &  array 
)
inline

Definition at line 942 of file array.h.

Variable Documentation

◆ Mul

VTOPERATOR_CPPARRAY* Mul

Definition at line 1034 of file array.h.