Skip to content

Commit 9ef8596

Browse files
Thiemo Wiedemeyerxlz
Thiemo Wiedemeyer
authored andcommitted
opencl: Use a different profiling macro
Enabling profiling in OpenCL effects the performance, so for profiling libfreenect2s processors, it should be disabled and only used when testing improvements of the OpenCL code itself.
1 parent b3cfd5e commit 9ef8596

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/opencl_depth_packet_processor.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class OpenCLDepthPacketProcessorImpl: public WithPerfLogging
225225
bool programInitialized;
226226
std::string sourceCode;
227227

228-
#if LIBFREENECT2_WITH_PROFILING
228+
#ifdef LIBFREENECT2_WITH_PROFILING_CL
229229
std::vector<double> timings;
230230
int count;
231231
#endif
@@ -454,7 +454,7 @@ class OpenCLDepthPacketProcessorImpl: public WithPerfLogging
454454

455455
bool initBuffers()
456456
{
457-
#if LIBFREENECT2_WITH_PROFILING
457+
#ifdef LIBFREENECT2_WITH_PROFILING_CL
458458
count = 0;
459459
CHECK_CL_PARAM(queue = cl::CommandQueue(context, device, CL_QUEUE_PROFILING_ENABLE, &err));
460460
#else
@@ -580,7 +580,7 @@ class OpenCLDepthPacketProcessorImpl: public WithPerfLogging
580580
CHECK_CL_RETURN(eventReadIr.wait());
581581
CHECK_CL_RETURN(eventReadDepth.wait());
582582

583-
#if LIBFREENECT2_WITH_PROFILING
583+
#ifdef LIBFREENECT2_WITH_PROFILING_CL
584584
if(count == 0)
585585
{
586586
timings.clear();

0 commit comments

Comments
 (0)