C# Class ManagedCuda.CudaDNN.TensorDescriptor

An opaque structure holding the description of a generic n-D dataset.
Inheritance: IDisposable
ファイルを表示 Open project: kunzmi/managedCuda Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Dispose

GetTensor4dDescriptor ( cudnnDataType &dataType, int &n, int &c, int &h, int &w, int &nStride, int &cStride, int &hStride, int &wStride ) : void

This function queries the parameters of the previouly initialized Tensor4D descriptor object.

GetTensorNdDescriptor ( int nbDimsRequested, cudnnDataType &dataType, int &nbDims, int dimA, int strideA ) : void

This function retrieves values stored in a previously initialized Tensor descriptor object.

SetTensor4dDescriptor ( cudnnTensorFormat format, cudnnDataType dataType, int n, int c, int h, int w ) : void

This function initializes a previously created generic Tensor descriptor object into a 4D tensor. The strides of the four dimensions are inferred from the format parameter and set in such a way that the data is contiguous in memory with no padding between dimensions.

SetTensor4dDescriptorEx ( cudnnDataType dataType, int n, int c, int h, int w, int nStride, int cStride, int hStride, int wStride ) : void

This function initializes a previously created generic Tensor descriptor object into a 4D tensor, similarly to cudnnSetTensor4dDescriptor but with the strides explicitly passed as parameters. This can be used to lay out the 4D tensor in any order or simply to define gaps between dimensions.

SetTensorNdDescriptor ( cudnnDataType dataType, int nbDims, int dimA, int strideA ) : void

This function initializes a previously created generic Tensor descriptor object.

TensorDescriptor ( ) : System

Protected Methods

Method Description
Dispose ( bool fDisposing ) : void

For IDisposable

Method Details

Dispose() public method

Dispose
public Dispose ( ) : void
return void

Dispose() protected method

For IDisposable
protected Dispose ( bool fDisposing ) : void
fDisposing bool
return void

GetTensor4dDescriptor() public method

This function queries the parameters of the previouly initialized Tensor4D descriptor object.
public GetTensor4dDescriptor ( cudnnDataType &dataType, int &n, int &c, int &h, int &w, int &nStride, int &cStride, int &hStride, int &wStride ) : void
dataType cudnnDataType Data type.
n int Number of images.
c int Number of feature maps per image.
h int Height of each feature map.
w int Width of each feature map.
nStride int Stride between two consecutive images.
cStride int Stride between two consecutive feature maps.
hStride int Stride between two consecutive rows.
wStride int Stride between two consecutive columns.
return void

GetTensorNdDescriptor() public method

This function retrieves values stored in a previously initialized Tensor descriptor object.
public GetTensorNdDescriptor ( int nbDimsRequested, cudnnDataType &dataType, int &nbDims, int dimA, int strideA ) : void
nbDimsRequested int Number of dimensions to extract from a given tensor descriptor. It is /// also the minimum size of the arrays dimA and strideA. If this number is /// greater than the resulting nbDims[0], only nbDims[0] dimensions will be /// returned.
dataType cudnnDataType Data type.
nbDims int Actual number of dimensions of the tensor will be returned in nbDims[0].
dimA int Array of dimension of at least nbDimsRequested that will be filled with /// the dimensions from the provided tensor descriptor.
strideA int Array of dimension of at least nbDimsRequested that will be filled with /// the strides from the provided tensor descriptor.
return void

SetTensor4dDescriptor() public method

This function initializes a previously created generic Tensor descriptor object into a 4D tensor. The strides of the four dimensions are inferred from the format parameter and set in such a way that the data is contiguous in memory with no padding between dimensions.
public SetTensor4dDescriptor ( cudnnTensorFormat format, cudnnDataType dataType, int n, int c, int h, int w ) : void
format cudnnTensorFormat Type of format.
dataType cudnnDataType Data type.
n int Number of images.
c int Number of feature maps per image.
h int Height of each feature map.
w int Width of each feature map.
return void

SetTensor4dDescriptorEx() public method

This function initializes a previously created generic Tensor descriptor object into a 4D tensor, similarly to cudnnSetTensor4dDescriptor but with the strides explicitly passed as parameters. This can be used to lay out the 4D tensor in any order or simply to define gaps between dimensions.
public SetTensor4dDescriptorEx ( cudnnDataType dataType, int n, int c, int h, int w, int nStride, int cStride, int hStride, int wStride ) : void
dataType cudnnDataType Data type.
n int Number of images.
c int Number of feature maps per image.
h int Height of each feature map.
w int Width of each feature map.
nStride int Stride between two consecutive images.
cStride int Stride between two consecutive feature maps.
hStride int Stride between two consecutive rows.
wStride int Stride between two consecutive columns.
return void

SetTensorNdDescriptor() public method

This function initializes a previously created generic Tensor descriptor object.
public SetTensorNdDescriptor ( cudnnDataType dataType, int nbDims, int dimA, int strideA ) : void
dataType cudnnDataType Data type.
nbDims int Dimension of the tensor.
dimA int Array of dimension nbDims that contain the size of the tensor for every dimension.
strideA int Array of dimension nbDims that contain the stride of the tensor for every dimension.
return void

TensorDescriptor() public method

public TensorDescriptor ( ) : System
return System