Example #1
0
 /// <summary>
 /// </summary>
 public OpTensorDescriptor(CudaDNNContext context)
 {
     _handle = context.Handle;
     _desc = new cudnnOpTensorDescriptor();
     res = CudaDNNNativeMethods.cudnnCreateOpTensorDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateOpTensorDescriptor", res));
     if (res != cudnnStatus.Success) throw new CudaDNNException(res);
 }
 /// <summary>
 /// </summary>
 public OpTensorDescriptor(CudaDNNContext context)
 {
     _handle = context.Handle;
     _desc   = new cudnnOpTensorDescriptor();
     res     = CudaDNNNativeMethods.cudnnCreateOpTensorDescriptor(ref _desc);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnCreateOpTensorDescriptor", res));
     if (res != cudnnStatus.Success)
     {
         throw new CudaDNNException(res);
     }
 }
 public static extern cudnnStatus cudnnCreateOpTensorDescriptor(
                                 ref cudnnOpTensorDescriptor opTensorDesc);
 public static extern cudnnStatus cudnnSetOpTensorDescriptor(
                                 cudnnOpTensorDescriptor opTensorDesc,
                                 cudnnOpTensorOp opTensorOp,
                                 cudnnDataType opTensorCompType,
                                 cudnnNanPropagation opTensorNanOpt);
 public static extern cudnnStatus cudnnOpTensor(
                                 cudnnHandle handle,
                         cudnnOpTensorDescriptor opTensorDesc,
                         ref double alpha1,
                         cudnnTensorDescriptor aDesc,
                         CUdeviceptr A,
                         ref double alpha2,
                         cudnnTensorDescriptor bDesc,
                         CUdeviceptr B,
                         ref double beta,
                         cudnnTensorDescriptor cDesc,
                         CUdeviceptr C);
 public static extern cudnnStatus cudnnDestroyOpTensorDescriptor(
                         cudnnOpTensorDescriptor opTensorDesc);