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