ManagedCuda.NVRTC.NVRTCNativeMethods.nvrtcGetProgramLogSize C# (CSharp) Method

nvrtcGetProgramLogSize() private method

private nvrtcGetProgramLogSize ( nvrtcProgram prog, ManagedCuda.BasicTypes.SizeT &logSizeRet ) : nvrtcResult
prog nvrtcProgram
logSizeRet ManagedCuda.BasicTypes.SizeT
return nvrtcResult
        public static extern nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, ref SizeT logSizeRet);

Usage Example

Beispiel #1
0
        /// <summary/>
        public byte[] GetLog()
        {
            SizeT logSize = new SizeT();

            res = NVRTCNativeMethods.nvrtcGetProgramLogSize(_program, ref logSize);
            Debug.Write("");            //Line(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvrtcGetProgramLogSize", res));
            if (res != nvrtcResult.Success)
            {
                throw new NVRTCException(res);
            }

            byte[] logCode = new byte[logSize];

            res = NVRTCNativeMethods.nvrtcGetProgramLog(_program, logCode);
            Debug.Write("");            //Line(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvrtcGetProgramLog", res));
            if (res != nvrtcResult.Success)
            {
                throw new NVRTCException(res);
            }

            return(logCode);
        }