private cudnnConvolutionForward ( |
||
handle | ||
alpha | double | |
srcDesc | ||
srcData | ManagedCuda.BasicTypes.CUdeviceptr | |
filterDesc | ||
filterData | ManagedCuda.BasicTypes.CUdeviceptr | |
convDesc | ||
algo | cudnnConvolutionFwdAlgo | |
workSpace | ManagedCuda.BasicTypes.CUdeviceptr | |
workSpaceSizeInBytes | ManagedCuda.BasicTypes.SizeT | |
beta | double | |
destDesc | ||
destData | ManagedCuda.BasicTypes.CUdeviceptr | |
return | cudnnStatus |
/* Convolution functions: All of the form "output = alpha * Op(inputs) + beta * output" */ /* Function to perform the forward multiconvolution */ public void ConvolutionForward(double alpha, TensorDescriptor srcDesc, CudaDeviceVariable <double> srcData, FilterDescriptor filterDesc, CudaDeviceVariable <double> filterData, ConvolutionDescriptor convDesc, cudnnConvolutionFwdAlgo algo, CudaDeviceVariable <byte> workSpace, SizeT workSpaceSizeInBytes, double beta, TensorDescriptor destDesc, CudaDeviceVariable <double> destData ) { res = CudaDNNNativeMethods.cudnnConvolutionForward(_handle, ref alpha, srcDesc.Desc, srcData.DevicePointer, filterDesc.Desc, filterData.DevicePointer, convDesc.Desc, algo, workSpace.DevicePointer, workSpaceSizeInBytes, ref beta, destDesc.Desc, destData.DevicePointer); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnConvolutionForward", res)); if (res != cudnnStatus.Success) { throw new CudaDNNException(res); } }