示例#1
0
 private static void SafeCall(curandStatus status)
 {
     if (status != curandStatus.CURAND_STATUS_SUCCESS)
     {
         throw new InvalidOperationException(status.ToString());
     }
 }
示例#2
0
 protected void SafeCall(curandStatus status, DevicePtrEx ptrEx = null)
 {
     if(ptrEx != null)
         Free(ptrEx);
     if (status != curandStatus.CURAND_STATUS_SUCCESS)
         throw new CudafyMathException(CudafyMathException.csRAND_ERROR_X, status.ToString());
 }
示例#3
0
文件: CudaRAND.cs 项目: ingted/Cudafy
 protected void SafeCall(curandStatus status, DevicePtrEx ptrEx = null)
 {
     if (ptrEx != null)
     {
         Free(ptrEx);
     }
     if (status != curandStatus.CURAND_STATUS_SUCCESS)
     {
         throw new CudafyMathException(CudafyMathException.csRAND_ERROR_X, status.ToString());
     }
 }