Kaydet (Commit) 292256d2 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Append kernel signature to the log area in the SAL_INFO dump of its source

Makes it possible to look at the OpenCL source for just a specific function,
by setting for instance SAL_LOG=+INFO.sc.opencl.source.nop_VLookup.

Change-Id: Ie9e1f7b1542043717ac3652226713f4ab88883e1
üst 6edbcc1b
...@@ -3287,7 +3287,14 @@ public: ...@@ -3287,7 +3287,14 @@ public:
decl << ") {\n\tint gid0 = get_global_id(0);\n\tresult[gid0] = " << decl << ") {\n\tint gid0 = get_global_id(0);\n\tresult[gid0] = " <<
DK->GenSlidingWindowDeclRef(false) << ";\n}\n"; DK->GenSlidingWindowDeclRef(false) << ";\n}\n";
mFullProgramSrc = decl.str(); mFullProgramSrc = decl.str();
SAL_INFO("sc.opencl.source", "Program to be compiled:\n" << mFullProgramSrc); std::stringstream area;
#ifdef SAL_DETAIL_ENABLE_LOG_INFO
if (mKernelSignature[0] == '_')
area << "sc.opencl.source." << mKernelSignature.substr(1, std::string::npos);
else
area << "sc.opencl.source." << mKernelSignature;
SAL_INFO(area.str().c_str(), "Program to be compiled:\n" << mFullProgramSrc);
#endif
} }
/// Produce kernel hash /// Produce kernel hash
std::string GetMD5() std::string GetMD5()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment