Skip to content

Commit

Permalink
Enable OpenCL if everything is initialized ok.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Zhou committed Apr 21, 2016
1 parent 6f99238 commit 72ba87f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/HACD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ SOP_HACD::SOP_HACD(OP_Network *net, const char *name, OP_Operator *op)
#ifdef USE_OPENCL
useOpenCL = true;
#endif
myHacdParams.m_oclAcceleration = useOpenCL;
myHacdParams.m_logger = &myLogger;
myHacdParams.m_callback = &myCallback;

Expand Down Expand Up @@ -239,7 +238,10 @@ SOP_HACD::SOP_HACD(OP_Network *net, const char *name, OP_Operator *op)
}
if (myCLDeviceId)
{
interfaceVHACD->OCLInit(&myCLDeviceId, &myLogger);
if (interfaceVHACD->OCLInit(&myCLDeviceId, &myLogger))
{
myHacdParams.m_oclAcceleration = true;
}
}
}
}
Expand Down

0 comments on commit 72ba87f

Please sign in to comment.