I install a Tesseract with OpenCL, but my computer always automatically choose the origin CPU like:
[DS] Profile read from file (tesseract_opencl_profile_devices.dat).
[DS] Device[1] 1:GeForce GTX 1070 score is 0.371834
[DS] Device[2] 0:(null) score is 0.312181
[DS] Selected Device[2]: "(null)" (Native)
I want to evaluate how the GPU works but I don't know to force my program to chose the GPU.
It says that set the environment variable "TESSERACT_OPENCL_DEVICE" can do this.
However, When I write this in my c++ program it seems nothing happened
tessact.SetVariable(""TESSERACT_OPENCL_DEVICE"", "1");
how do I set the "TESSERACT_OPENCL_DEVICE"' variable in my program?