Ejemplo n.º 1
0
 private static void SafeCall(curandStatus status)
 {
     if (status != curandStatus.CURAND_STATUS_SUCCESS)
     {
         throw new InvalidOperationException(status.ToString());
     }
 }
Ejemplo n.º 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());
 }
Ejemplo n.º 3
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());
     }
 }