private static void TestResult(CUresult r) { if (r != CUresult.CUDA_SUCCESS) { throw new ApplicationException("CUDA error: " + r.ToString()); } }
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; } }
private static void testResult(CUresult r) { //Console.WriteLine("thr = '" + Thread.CurrentThread.Priority + "'"); //{ // StackFrame fr = new StackFrame(1, true); // _MethodBase m = fr.GetMethod(); // string _name = m.DeclaringType.FullName + "." + m.Name; // Console.WriteLine(_name); //} if (r != CUresult.CUDA_SUCCESS) { throw new ApplicationException("CUDA error: " + r.ToString()); } }