Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Public Member Functions | Data Fields
iu::TensorGpu< PixelType >::TensorKernelData Struct Reference

Struct pointer TensorKernelData that can be used in CUDA kernels. More...

#include <tensor_gpu.h>

Public Member Functions

__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)
 

Data Fields

PixelType * data_
 
unsigned int length_
 
unsigned int stride0
 
unsigned int stride1
 
unsigned int stride2
 
unsigned short N
 
unsigned short C
 
unsigned short H
 
unsigned short W
 

Detailed Description

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.

Constructor & Destructor Documentation

template<typename PixelType>
__host__ iu::TensorGpu< PixelType >::TensorKernelData::TensorKernelData ( const TensorGpu< PixelType > &  tensor)
inline

Constructor

Member Function Documentation

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]linearIdxLinear index.
[out]dim0Position in the first dimension.
[out]dim1Position in the second dimension.
[out]dim2Position in the third dimension.
[out]dim3Position 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
pos0Position in the first dimension.
pos1Position in the second dimension.
pos2Position in the third dimension.
pos3Position in the forth dimension.
Returns
value at position (pos0, pos1, pos2, pos3).

Field Documentation

template<typename PixelType>
unsigned short iu::TensorGpu< PixelType >::TensorKernelData::C

Number of channels.

template<typename PixelType>
PixelType* iu::TensorGpu< PixelType >::TensorKernelData::data_

Pointer to device buffer.

template<typename PixelType>
unsigned short iu::TensorGpu< PixelType >::TensorKernelData::H

Height.

template<typename PixelType>
unsigned int iu::TensorGpu< PixelType >::TensorKernelData::length_

Length of the memory.

template<typename PixelType>
unsigned short iu::TensorGpu< PixelType >::TensorKernelData::N

Number of samples.

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>
unsigned short iu::TensorGpu< PixelType >::TensorKernelData::W

Width.


The documentation for this struct was generated from the following file: