Device 4D tensor class.
More...
#include <tensor_gpu.h>
|
| TensorGpu (MemoryLayout memoryLayout=NCHW) |
|
virtual | ~TensorGpu () |
|
| TensorGpu (const unsigned int N, const unsigned int C, const unsigned int H, const unsigned int W, MemoryLayout memoryLayout=NCHW) |
|
| TensorGpu (PixelType *device_data, const unsigned int N, const unsigned int C, const unsigned int H, const unsigned int W, bool ext_data_pointer=false, MemoryLayout memoryLayout=NCHW) |
|
unsigned int | samples () const |
|
unsigned int | channels () const |
|
unsigned int | height () const |
|
unsigned int | width () const |
|
MemoryLayout | memoryLayout () const |
|
ndarray_ref< PixelType, 4 > | ref () const |
|
| TensorGpu (const ndarray_ref< PixelType, 4 > &x) |
|
| LinearDeviceMemory () |
|
| LinearDeviceMemory (const Size< Ndim > &size) |
|
| LinearDeviceMemory (const unsigned int &numel) |
|
| LinearDeviceMemory (PixelType *device_data, const Size< Ndim > &size, bool ext_data_pointer=false) |
|
| LinearDeviceMemory (PixelType *device_data, const unsigned int &numel, bool ext_data_pointer=false) |
|
| LinearDeviceMemory (const ndarray_ref< PixelType, Ndim > &x) |
|
virtual | ~LinearDeviceMemory () |
|
PixelType * | data (unsigned int offset=0) |
|
const PixelType * | data (unsigned int offset=0) const |
|
thrust::device_ptr< PixelType > | begin (void) |
|
thrust::device_ptr< PixelType > | end (void) |
|
virtual size_t | bytes () const |
|
virtual unsigned int | bitDepth () const |
|
virtual bool | onDevice () const |
|
ndarray_ref< PixelType, Ndim > | ref () const |
|
| LinearMemory () |
|
| LinearMemory (const Size< Ndim > &size) |
|
| LinearMemory (const unsigned int &numel) |
|
bool | sameType (const LinearMemory &from) |
|
virtual | ~LinearMemory () |
|
unsigned int | numel () const |
|
Size< Ndim > | size () const |
|
Size< Ndim > | stride () const |
|
template<typename PixelType>
class iu::TensorGpu< PixelType >
Device 4D tensor class.
template<typename PixelType>
Define the current pixel type.
template<typename PixelType>
Memory layout to access the data elements.
Defines how the elements are laid out in the memory.
- NCHW: Samples - channels - height - width
- NHWC: Samples - height - width - channels
template<typename PixelType>
template<typename PixelType>
template<typename PixelType>
Special constructor.
- Parameters
-
N | Number of samples |
C | Number of channels |
H | Height |
W | Width |
memoryLayout | MemoryLayout |
template<typename PixelType>
iu::TensorGpu< PixelType >::TensorGpu |
( |
PixelType * |
device_data, |
|
|
const unsigned int |
N, |
|
|
const unsigned int |
C, |
|
|
const unsigned int |
H, |
|
|
const unsigned int |
W, |
|
|
bool |
ext_data_pointer = false , |
|
|
MemoryLayout |
memoryLayout = NCHW |
|
) |
| |
|
inline |
Special constructor.
- Parameters
-
device_data | Device data pointer |
N | Number of samples |
C | Number of channels |
H | Height |
W | Width |
ext_data_pointer | Use external data pointer as internal data pointer |
memoryLayout | MemoryLayout |
template<typename PixelType>
construct from ndarray_ref – include ndarray/ndarray_iu.h
template<typename PixelType>
Returns the number of channels.
template<typename PixelType>
template<typename PixelType>
template<typename PixelType>
template<typename PixelType>
Returns the number of samples.
template<typename PixelType>
template<typename PixelType>
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
TensorGpu< PixelType > const & |
tensor |
|
) |
| |
|
friend |
Operator<< overloading. Output of TensorGpu class.
The documentation for this class was generated from the following file:
- /home/christian/workdir/postdoc/projects/mobile-vision-private/software/libs/mobilevision/imageutilities/include/iu/iucore/tensor_gpu.h