예제 #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());
     }
 }