#include <cu-array.h>


Public Member Functions | |
| CuSubArray (const CuArrayBase< T > &src, MatrixIndexT offset, MatrixIndexT dim) | |
| Constructor as a range of an existing CuArray or CuSubArray. More... | |
| CuSubArray (const T *data, MatrixIndexT length) | |
| Construct from raw pointers. More... | |
Public Member Functions inherited from CuArrayBase< T > | |
| MatrixIndexT | Dim () const |
| Return the vector dimension. More... | |
| const T * | Data () const |
| Get raw pointer. More... | |
| T * | Data () |
| void | SetZero () |
| Sets the memory for the object to zero, via memset. More... | |
| void | CopyFromArray (const CuArrayBase< T > &src) |
| The caller is responsible to ensure dim is equal between *this and src. More... | |
| void | CopyFromVec (const std::vector< T > &src) |
| The caller is responsible to ensure dim is equal between *this and src. More... | |
| void | CopyToVec (std::vector< T > *dst) const |
| This function resizes *dst if needed. More... | |
| void | CopyToHost (T *dst) const |
| Version of the above function that copies contents to a host array (i.e. More... | |
| void | Set (const T &value) |
| Set to a constant value. More... | |
| void | Sequence (const T base) |
| Fill with the sequence [base ... More... | |
| void | Add (const T &value) |
| Add a constant value. More... | |
| T | Min () const |
| Get minimum value (for now implemented on CPU, reimplement if slow). More... | |
| T | Max () const |
| Get minimum value (for now implemented on CPU, reimplement if slow). More... | |
| template<> | |
| void | Set (const int32 &value) |
| template<> | |
| void | Sequence (const int32 base) |
| template<> | |
| void | Add (const int32 &value) |
| template<> | |
| void | Sequence (const int32 base) |
| template<> | |
| void | Set (const int32 &value) |
| template<> | |
| void | Add (const int32 &value) |
Additional Inherited Members | |
Protected Member Functions inherited from CuArrayBase< T > | |
| CuArrayBase () | |
| Default constructor: make it protected so the user cannot instantiate this class. More... | |
Protected Attributes inherited from CuArrayBase< T > | |
| T * | data_ |
| GPU data pointer (if GPU not available, will point to CPU memory). More... | |
| MatrixIndexT | dim_ |
| dimension of the vector More... | |
Definition at line 33 of file cu-array.h.
|
explicit |
Constructor as a range of an existing CuArray or CuSubArray.
Note: like similar constructors in class CuVector and others, it can be used to evade 'const' constraints; don't do that.
Definition at line 315 of file cu-array-inl.h.
References data_, CuArrayBase< T >::data_, CuArrayBase< T >::Dim(), and KALDI_ASSERT.
|
inline |
Construct from raw pointers.
Definition at line 189 of file cu-array.h.
References CuArrayBase< T >::data_, and CuArrayBase< T >::dim_.