Пример #1
0
 public static void Check(CUresult error, string message)
 {
     if (error != CUresult.CUDA_SUCCESS)
     {
         message = string.Format("{0}: {1}", error.ToString(), message);
         Exception exception = new CudaException(message);
         exception.Data.Add("CUresult", error);
         throw exception;
     }
 }
Пример #2
0
 public static void Check(cudaError error, string message)
 {
     if (error != cudaError.cudaSuccess)
     {
         message = string.Format("{0}: {1}", error.ToString(), message);
         Exception exception = new CudaException(message);
         exception.Data.Add("cudaError", error);
         throw exception;
     }
 }