HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
wrapArray.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/vt/api.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/vt/types.h"
#include "pxr/base/vt/value.h"
#include "pxr/base/vt/pyOperators.h"
#include "pxr/base/vt/functions.h"
#include "pxr/base/arch/math.h"
#include "pxr/base/arch/inttypes.h"
#include "pxr/base/arch/pragmas.h"
#include "pxr/base/gf/half.h"
#include "pxr/base/tf/pyContainerConversions.h"
#include "pxr/base/tf/pyFunction.h"
#include "pxr/base/tf/pyLock.h"
#include "pxr/base/tf/pyObjWrapper.h"
#include "pxr/base/tf/pyResultConversions.h"
#include "pxr/base/tf/pyUtils.h"
#include "pxr/base/tf/iterator.h"
#include "pxr/base/tf/span.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/tf.h"
#include "pxr/base/tf/wrapTypeHelpers.h"
#include <hboost/preprocessor/facilities/empty.hpp>
#include <hboost/preprocessor/punctuation/comma_if.hpp>
#include <hboost/preprocessor/repetition/repeat.hpp>
#include <hboost/preprocessor/seq/for_each.hpp>
#include <hboost/python/class.hpp>
#include <hboost/python/copy_const_reference.hpp>
#include <hboost/python/def.hpp>
#include <hboost/python/detail/api_placeholder.hpp>
#include <hboost/python/extract.hpp>
#include <hboost/python/implicit.hpp>
#include <hboost/python/iterator.hpp>
#include <hboost/python/make_constructor.hpp>
#include <hboost/python/object.hpp>
#include <hboost/python/operators.hpp>
#include <hboost/python/return_arg.hpp>
#include <hboost/python/slice.hpp>
#include <hboost/python/type_id.hpp>
#include <hboost/python/overloads.hpp>
#include <algorithm>
#include <numeric>
#include <ostream>
#include <string>
#include <memory>
#include <vector>
+ Include dependency graph for wrapArray.h:

Go to the source code of this file.

Namespaces

 Vt_WrapArray
 

Macros

#define _OPTIMIZED_STREAM_INTEGRAL_TYPES
 
#define MAKE_STREAM_FUNC(r, unused, type)
 
#define MAKE_STREAM_FUNC(r, unused, elem)
 
#define WRITE(z, n, data)   HBOOST_PP_COMMA_IF(n) data
 
#define VtCat_DEF(z, n, unused)   def("Cat",(VtArray<Type> (*)( HBOOST_PP_REPEAT(n, WRITE, VtArray<Type> const &) ))VtCat<Type>);
 
#define VT_WRAP_ARRAY(r, unused, elem)   VtWrapArray< VtArray< VT_TYPE(elem) > >();
 
#define VT_WRAP_COMPARISON(r, unused, elem)   VtWrapComparisonFunctions< VtArray< VT_TYPE(elem) > >();
 

Functions

template<typename T >
object Vt_WrapArray::getitem_ellipsis (VtArray< T > const &self, object idx)
 
template<typename T >
object Vt_WrapArray::getitem_index (VtArray< T > const &self, int idx)
 
template<typename T >
object Vt_WrapArray::getitem_slice (VtArray< T > const &self, slice idx)
 
template<typename T , typename S >
void Vt_WrapArray::setArraySlice (VtArray< T > &self, S value, slice::range< T * > &range, size_t setSize, bool tile=false)
 
template<typename T >
void Vt_WrapArray::setArraySlice (VtArray< T > &self, slice idx, object value, bool tile=false)
 
template<typename T >
void Vt_WrapArray::setitem_ellipsis (VtArray< T > &self, object idx, object value)
 
template<typename T >
void Vt_WrapArray::setitem_index (VtArray< T > &self, int idx, object value)
 
template<typename T >
void Vt_WrapArray::setitem_slice (VtArray< T > &self, slice idx, object value)
 
template<class T >
VT_API string Vt_WrapArray::GetVtArrayName ()
 
 Vt_WrapArray::HBOOST_PP_SEQ_FOR_EACH (MAKE_STREAM_FUNC,~, VT_FLOATING_POINT_BUILTIN_VALUE_TYPES) static unsigned int Vt_ComputeEffectiveRankAndLastDimSize(Vt_ShapeData const *sd
 
 Vt_WrapArray::if (rank==1) return rank
 
 Vt_WrapArray::if (remainder) rank
 
template<typename T >
string Vt_WrapArray::__repr__ (VtArray< T > const &self)
 
template<typename T >
VtArray< T > * Vt_WrapArray::VtArray__init__ (object const &values)
 
template<typename T >
VtArray< T > * Vt_WrapArray::VtArray__init__2 (unsigned int size, object const &values)
 
template<typename T >
void VtWrapArray ()
 
template<typename T >
void VtWrapComparisonFunctions ()
 
template<class Array >
VtValue Vt_ConvertFromPySequence (TfPyObjWrapper const &obj)
 
template<class Array , class Iter >
VtValue Vt_ConvertFromRange (Iter begin, Iter end)
 
template<class T >
VtValue Vt_CastToArray (VtValue const &v)
 
template<class Elem >
void VtRegisterValueCastsFromPythonSequencesToArray ()
 Register casts with VtValue from python sequences to VtArray types. More...
 

Variables

size_t *lastDimSize unsigned int Vt_WrapArray::rank = sd->GetRank()
 
size_t Vt_WrapArray::divisor
 
size_t Vt_WrapArray::remainder = divisor ? sd->totalSize % divisor : 0
 
Vt_WrapArray::lastDimSize = divisor ? sd->totalSize / divisor : 0
 

Macro Definition Documentation

#define _OPTIMIZED_STREAM_INTEGRAL_TYPES
Value:
(short) \
(unsigned short) \
(int) \
(unsigned int) \
(long) \
(unsigned long) \
(long long) \
(unsigned long long)
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer

Definition at line 282 of file wrapArray.h.

#define MAKE_STREAM_FUNC (   r,
  unused,
  type 
)
Value:
static inline void \
streamValue(std::ostringstream &stream, type const &value) { \
}
GLuint GLuint stream
Definition: glew.h:7265
GLuint GLuint GLsizei GLenum type
Definition: glew.h:1253
GLsizei const GLfloat * value
Definition: glew.h:1849

Definition at line 314 of file wrapArray.h.

#define MAKE_STREAM_FUNC (   r,
  unused,
  elem 
)
Value:
static inline void \
streamValue(std::ostringstream &stream, VT_TYPE(elem) const &value) { \
if (_IsFinite(value)) { \
} else { \
stream << TfPyRepr(value); \
} \
}
GLuint GLuint stream
Definition: glew.h:7265
std::string TfPyRepr(T const &t)
Definition: pyUtils.h:138
if(remainder) rank
#define VT_TYPE(elem)
Definition: types.h:138
GLsizei const GLfloat * value
Definition: glew.h:1849

Definition at line 314 of file wrapArray.h.

#define VT_WRAP_ARRAY (   r,
  unused,
  elem 
)    VtWrapArray< VtArray< VT_TYPE(elem) > >();

Definition at line 622 of file wrapArray.h.

#define VT_WRAP_COMPARISON (   r,
  unused,
  elem 
)    VtWrapComparisonFunctions< VtArray< VT_TYPE(elem) > >();

Definition at line 624 of file wrapArray.h.

#define VtCat_DEF (   z,
  n,
  unused 
)    def("Cat",(VtArray<Type> (*)( HBOOST_PP_REPEAT(n, WRITE, VtArray<Type> const &) ))VtCat<Type>);
#define WRITE (   z,
  n,
  data 
)    HBOOST_PP_COMMA_IF(n) data

Function Documentation

template<class T >
VtValue Vt_CastToArray ( VtValue const v)

Definition at line 600 of file wrapArray.h.

template<class Array >
VtValue Vt_ConvertFromPySequence ( TfPyObjWrapper const obj)

Definition at line 558 of file wrapArray.h.

template<class Array , class Iter >
VtValue Vt_ConvertFromRange ( Iter  begin,
Iter  end 
)

Definition at line 585 of file wrapArray.h.

template<class Elem >
void VtRegisterValueCastsFromPythonSequencesToArray ( )

Register casts with VtValue from python sequences to VtArray types.

Definition at line 615 of file wrapArray.h.

template<typename T >
void VtWrapArray ( )

Definition at line 447 of file wrapArray.h.

template<typename T >
void VtWrapComparisonFunctions ( )

Definition at line 540 of file wrapArray.h.