A SubDim
-rank slice of a parent Tensor.
More...
Public Member Functions | |
__host__ __device__ SubTensor < TensorType, SubDim-1, PtrTraits > | operator[] (typename TensorType::IndexType index) |
__host__ __device__ const SubTensor< TensorType, SubDim-1, PtrTraits > | operator[] (typename TensorType::IndexType index) const |
__host__ __device__ TensorType::DataType * | operator& () |
__host__ __device__ const TensorType::DataType * | operator& () const |
__host__ __device__ TensorType::DataPtrType | data () |
Returns a raw accessor to our slice. | |
__host__ __device__ const TensorType::DataPtrType | data () const |
Returns a raw accessor to our slice (const). | |
template<typename T > | |
__host__ __device__ T & | as () |
Cast to a different datatype. | |
template<typename T > | |
__host__ __device__ const T & | as () const |
Cast to a different datatype (const). | |
template<typename T > | |
__host__ __device__ PtrTraits < T >::PtrType | dataAs () |
Cast to a different datatype. | |
template<typename T > | |
__host__ __device__ PtrTraits < const T >::PtrType | dataAs () const |
Cast to a different datatype (const) | |
__device__ TensorType::DataType | ldg () const |
Use the texture cache for reads. | |
template<typename T > | |
__device__ T | ldgAs () const |
Use the texture cache for reads; cast as a particular type. | |
Tensor< typename TensorType::DataType, SubDim, TensorType::IsInnerContig, typename TensorType::IndexType, PtrTraits > | view () |
Protected Member Functions | |
__host__ __device__ | SubTensor (TensorType &t, typename TensorType::DataPtrType data) |
Protected Attributes | |
TensorType & | tensor_ |
The tensor we're referencing. | |
TensorType::DataPtrType const | data_ |
The start of our sub-region. | |
Friends | |
class | SubTensor< TensorType, SubDim+1, PtrTraits > |
One dimension greater can create us. | |
class | Tensor< typename TensorType::DataType, TensorType::NumDim, TensorType::IsInnerContig, typename TensorType::IndexType, PtrTraits > |
Our parent tensor can create us. | |
A SubDim
-rank slice of a parent Tensor.
Definition at line 36 of file Tensor.cuh.
|
inline |
Returns a view of the data located at our offset (the dimension SubDim
- 1 tensor).
Definition at line 496 of file Tensor.cuh.
|
inline |
Returns a view of the data located at our offset (the dimension SubDim
- 1 tensor) (const).
Definition at line 512 of file Tensor.cuh.
|
inline |
Returns a tensor that is a view of the SubDim-dimensional slice of this tensor, starting where our data begins
Definition at line 596 of file Tensor.cuh.