8 #ifndef _PyImathFixedVArray_h_
9 #define _PyImathFixedVArray_h_
11 #define HBOOST_BIND_GLOBAL_PLACEHOLDERS
12 #include <hboost/python.hpp>
13 #include <hboost/any.hpp>
28 std::vector<T> * _ptr;
37 hboost::shared_array<size_t> _indices;
38 size_t _unmaskedLength;
73 Py_ssize_t
len()
const {
return _length; }
74 size_t stride()
const {
return _stride; }
124 static hboost::python::class_<FixedVArray<T> >
register_(
const char* doc);
127 static const char*
name();
131 bool strictComparison =
true)
const
138 bool throwExc =
false;
139 if (strictComparison)
145 if (_unmaskedLength != (
size_t) mask.
len())
157 throw std::invalid_argument(
"Dimensions of source do not match destination");
164 bool strictComparison =
true)
const
171 bool throwExc =
false;
172 if (strictComparison)
178 if (_unmaskedLength != (
size_t) other.
len())
190 throw std::invalid_argument(
"Dimensions of source do not match destination");
203 #endif // _PyImathFixedVArray_h_
const FixedVArray & operator=(const FixedVArray< T > &other)
FixedArray< int > getitem_mask(const FixedArray< int > &mask) const
FixedVArray< T > getslice(PyObject *index) const
GLboolean GLboolean GLboolean GLboolean a
GLuint GLsizei GLsizei * length
size_t match_dimension(const FixedArray< T2 > &mask, bool strictComparison=true) const
static hboost::python::class_< FixedVArray< T > > register_(const char *doc)
void setitem_scalar_mask(const FixedArray< int > &mask, size_t size)
bool any(const vbool4 &v)
const hboost::any & handle()
void setitem_vector_mask(const FixedArray< int > &mask, const FixedArray< int > &size)
FixedArray< T > getitem(Py_ssize_t index)
FixedArray< int > getitem_slice(PyObject *index) const
GLint GLenum GLboolean GLsizei stride
SizeHelper(FixedVArray &a)
static const char * name()
bool isMaskedReference() const
void setitem_scalar(PyObject *index, const FixedArray< T > &data)
size_t raw_ptr_index(size_t i) const
std::vector< T > & operator[](size_t i)
void setitem_scalar_mask(const FixedArray< int > &mask, const FixedArray< T > &data)
void setitem_vector_mask(const FixedArray< int > &mask, const FixedVArray< T > &data)
hboost::shared_ptr< SizeHelper > getSizeHelper()
void setitem_vector(PyObject *index, const FixedArray< int > &size)
void setitem_vector(PyObject *index, const FixedVArray< T > &data)
FixedVArray(std::vector< T > *ptr, Py_ssize_t length, Py_ssize_t stride=1, bool writable=true)
FixedVArray< T > getslice_mask(const FixedArray< int > &mask)
size_t match_dimension(const FixedVArray< T > &other, bool strictComparison=true) const
void setitem_scalar(PyObject *index, size_t size)
int getitem(Py_ssize_t index) const
size_t unmaskedLength() const