/// <summary> /// Get the descriptive string for a CUptiResult. /// </summary> /// <param name="result"></param> /// <returns></returns> public static string GetResultString(CUptiResult result) { IntPtr ptr = IntPtr.Zero; CheckResult(API.cuptiGetResultString(result, ref ptr)); return(Marshal.PtrToStringAnsi(ptr)); }
static void CheckResult(CUptiResult result) { if (result != CUptiResult.CUPTI_SUCCESS) { throw new CudaException(result.ToString()); } }
public static extern CUptiResult cuptiGetResultString( CUptiResult result, ref IntPtr str // const char** );