Mercurial > hg > Members > yutaka > OpenCL
comparison WordCount/oclUtils.cc @ 1:403e35dd9b6d
word count ...
author | Yutaka_Kinjyo |
---|---|
date | Tue, 12 Jul 2011 17:17:11 +0900 |
parents | 0e6e76dbdb0f |
children |
comparison
equal
deleted
inserted
replaced
0:0e6e76dbdb0f | 1:403e35dd9b6d |
---|---|
81 const int index = -error; | 81 const int index = -error; |
82 | 82 |
83 return (index >= 0 && index < errorCount) ? errorString[index] : "Unspecified Error"; | 83 return (index >= 0 && index < errorCount) ? errorString[index] : "Unspecified Error"; |
84 } | 84 } |
85 | 85 |
86 ////////////////////////////////////////////////////////////////////////////// | |
87 //! Get and log the binary (PTX) from the OpenCL compiler for the requested program & device | |
88 //! | |
89 //! @param cpProgram OpenCL program | |
90 //! @param cdDevice device of interest | |
91 ////////////////////////////////////////////////////////////////////////////// | |
92 void oclLogBuildInfo(cl_program cpProgram, cl_device_id cdDevice) | |
93 { | |
94 // write out the build log and ptx, then exit | |
95 char cBuildLog[10240]; | |
96 clGetProgramBuildInfo(cpProgram, cdDevice, CL_PROGRAM_BUILD_LOG, | |
97 sizeof(cBuildLog), cBuildLog, NULL ); | |
98 //shrLog("\n%s\nBuild Log:\n%s\n%s\n", HDASHLINE, cBuildLog, HDASHLINE); | |
99 printf("Build Log:\n%s\n", cBuildLog); | |
100 } | |
101 |