Struct pointer TensorKernelData that can be used in CUDA kernels.
More...
#include <tensor_gpu.h>
|
__device__ PixelType & | operator() (short pos0, short pos1, short pos2, short pos3) |
|
__device__ void | coords (unsigned int linearIdx, short *dim0, short *dim1, short *dim2, short *dim3) |
|
__host__ | TensorKernelData (const TensorGpu< PixelType > &tensor) |
|
template<typename PixelType>
struct iu::TensorGpu< PixelType >::TensorKernelData
Struct pointer TensorKernelData that can be used in CUDA kernels.
This struct provides the device data pointer as well as important class properties.
template<typename PixelType>
__host__ iu::TensorGpu< PixelType >::TensorKernelData::TensorKernelData |
( |
const TensorGpu< PixelType > & |
tensor | ) |
|
|
inline |
template<typename PixelType>
__device__ void iu::TensorGpu< PixelType >::TensorKernelData::coords |
( |
unsigned int |
linearIdx, |
|
|
short * |
dim0, |
|
|
short * |
dim1, |
|
|
short * |
dim2, |
|
|
short * |
dim3 |
|
) |
| |
|
inline |
Get position / coordinates for a linear index.
- Parameters
-
[in] | linearIdx | Linear index. |
[out] | dim0 | Position in the first dimension. |
[out] | dim1 | Position in the second dimension. |
[out] | dim2 | Position in the third dimension. |
[out] | dim3 | Position in the forth dimension. |
template<typename PixelType>
__device__ PixelType& iu::TensorGpu< PixelType >::TensorKernelData::operator() |
( |
short |
pos0, |
|
|
short |
pos1, |
|
|
short |
pos2, |
|
|
short |
pos3 |
|
) |
| |
|
inline |
Access the image via the () operator according to MemoryLayout.
- Parameters
-
pos0 | Position in the first dimension. |
pos1 | Position in the second dimension. |
pos2 | Position in the third dimension. |
pos3 | Position in the forth dimension. |
- Returns
- value at position (pos0, pos1, pos2, pos3).
template<typename PixelType>
template<typename PixelType>
Pointer to device buffer.
template<typename PixelType>
template<typename PixelType>
unsigned int iu::TensorGpu< PixelType >::TensorKernelData::length_ |
template<typename PixelType>
template<typename PixelType>
unsigned int iu::TensorGpu< PixelType >::TensorKernelData::stride0 |
Stride in first dimension.
template<typename PixelType>
unsigned int iu::TensorGpu< PixelType >::TensorKernelData::stride1 |
Stride in second dimension.
template<typename PixelType>
unsigned int iu::TensorGpu< PixelType >::TensorKernelData::stride2 |
Stride in third dimension.
template<typename PixelType>
The documentation for this struct was generated from the following file:
- /home/christian/workdir/postdoc/projects/mobile-vision-private/software/libs/mobilevision/imageutilities/include/iu/iucore/tensor_gpu.h