/// <summary>
 /// </summary>
 public PoolingDescriptor()
 {
     _desc = new cudnnPoolingDescriptor();
     res = CudaDNNNativeMethods.cudnnCreatePoolingDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreatePoolingDescriptor", res));
     if (res != cudnnStatus.Success) throw new CudaDNNException(res);
 }
Beispiel #2
0
 /// <summary>
 /// </summary>
 public PoolingDescriptor()
 {
     _desc = new cudnnPoolingDescriptor();
     res   = CudaDNNNativeMethods.cudnnCreatePoolingDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreatePoolingDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
		public static extern cudnnStatus cudnnPoolingBackward( cudnnHandle handle,
														cudnnPoolingDescriptor poolingDesc,
														ref double alpha,
														cudnnTensorDescriptor srcDesc,
														CUdeviceptr srcData,
														cudnnTensorDescriptor srcDiffDesc,
														CUdeviceptr srcDiffData,
														cudnnTensorDescriptor destDesc,
														CUdeviceptr destData,
														ref double beta,
														cudnnTensorDescriptor destDiffDesc,
														CUdeviceptr destDiffData
													  );
		public static extern cudnnStatus cudnnDestroyPoolingDescriptor( cudnnPoolingDescriptor poolingDesc );
		public static extern cudnnStatus cudnnPoolingForward(  cudnnHandle handle,
														cudnnPoolingDescriptor poolingDesc,
														ref float alpha,
														cudnnTensorDescriptor srcDesc,
														CUdeviceptr srcData,
														ref float beta,
														cudnnTensorDescriptor destDesc,
														CUdeviceptr destData
													 );
		public static extern cudnnStatus cudnnGetPoolingNdForwardOutputDim( cudnnPoolingDescriptor poolingDesc,
																	 cudnnTensorDescriptor inputTensorDesc,
																	 int nbDims,
																	 int[] outputTensorDimA);
		public static extern cudnnStatus cudnnGetPooling2dForwardOutputDim( cudnnPoolingDescriptor poolingDesc,
																	 cudnnTensorDescriptor inputTensorDesc,
																	 ref int outN,
																	 ref int outC,
																	 ref int outH,
																	 ref int outW);
		public static extern cudnnStatus cudnnGetPoolingNdDescriptor(  cudnnPoolingDescriptor poolingDesc,
																int nbDimsRequested,
																ref cudnnPoolingMode mode,
																ref int nbDims,
																int[] windowDimA,
																int[] paddingA,
																int[] strideA
															 );
		public static extern cudnnStatus cudnnSetPoolingNdDescriptor(  cudnnPoolingDescriptor poolingDesc,
																cudnnPoolingMode mode,
																int nbDims,
																int[] windowDimA,
																int[] paddingA,
																int[] strideA
														   );
		public static extern cudnnStatus cudnnGetPooling2dDescriptor(  cudnnPoolingDescriptor poolingDesc,
																ref cudnnPoolingMode mode,
																ref int windowHeight,
																ref int windowWidth,
																ref int verticalPadding,
																ref int horizontalPadding,
																ref int verticalStride,
																ref int horizontalStride
														   );
		public static extern cudnnStatus cudnnCreatePoolingDescriptor( ref cudnnPoolingDescriptor poolingDesc);
        public static extern cudnnStatus cudnnSetPooling2dDescriptor(  cudnnPoolingDescriptor poolingDesc,
																cudnnPoolingMode mode,
                                                                cudnnNanPropagation maxpoolingNanOpt,
                                                                int windowHeight,
																int windowWidth,
																int verticalPadding,
																int horizontalPadding,
																int verticalStride,
																int horizontalStride
														   );