Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
 static void CheckResult(CUptiResult result)
 {
     if (result != CUptiResult.CUPTI_SUCCESS)
     {
         throw new CudaException(result.ToString());
     }
 }
Ejemplo n.º 3
0
 public static extern CUptiResult cuptiGetResultString(
     CUptiResult result,
     ref IntPtr str                      // const char**
     );