Library/ManagedCuda/CudaDNN/TensorDescriptor.cs
/// <summary>
/// This function initializes a previously created generic Tensor descriptor object.
/// </summary>
/// <param name="dataType">Data type.</param>
/// <param name="nbDims">Dimension of the tensor.</param>
/// <param name="dimA">Array of dimension nbDims that contain the size of the tensor for every dimension.</param>
/// <param name="strideA">Array of dimension nbDims that contain the stride of the tensor for every dimension.</param>
This function initializes a previously created generic Tensor descriptor object.
This function initializes a previously created generic Tensor descriptor object .
public void SetTensorNdDescriptor(cudnnDataType dataType,
                                            int nbDims,
                                            int[] dimA,
                                            int[] strideA
                                            )
        {
            res = CudaDNNNativeMethods.cudnnSetTensorNdDescriptor(_desc, dataType, nbDims, dimA, strideA);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetTensorNdDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
public void SetTensorNdDescriptor ( cudnnDataType dataType , int nbDims , int [ ] dimA , int [ ] strideA ) { res = CudaDNNNativeMethods . cudnnSetTensorNdDescriptor ( _desc , dataType , nbDims , dimA , strideA ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function initializes a previously created generic Tensor descriptor object.
This function initializes a previously created generic Tensor descriptor object .
dataType
cudnnDataType
None
nbDims
int
Dimension of the tensor.
Dimension of the tensor .
dimA
int[]
Array of dimension nbDims that contain the size of the tensor for every dimension.
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.
Array of dimension nbDims that contain the stride of the tensor for every dimension .