Commit Graph

20 Commits

Author SHA1 Message Date
Stefan Weil
c1a01d0c51 opencl: Fix some compiler warnings [-Wunused-function]
opencl_device_selection.h contains lots of code which is only used in
openclwrapper.cpp. This results in several compiler warnings:

opencl/opencl_device_selection.h:396:18: warning:
 ‘ds_status readProfileFromFile(ds_profile*, ds_score_deserializer, const char*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:257:18: warning:
 ‘ds_status writeProfileToFile(ds_profile*, ds_score_serializer, const char*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:196:18: warning:
 ‘ds_status profileDevices(ds_profile*, ds_evaluation_type, ds_perf_evaluator, void*, unsigned int*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:90:18: warning:
 ‘ds_status initDSProfile(ds_profile**, const char*)’ defined but not used [-Wunused-function]
opencl/opencl_device_selection.h:70:18: warning:
 ‘ds_status releaseDSProfile(ds_profile*, ds_score_release)’ defined but not used [-Wunused-function]

Move that functions and all related code to openclwrapper.cpp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-01 12:34:27 +02:00
Ray Smith
f566a45b30 clang-tidy changes from sync 2017-01-25 16:20:19 -08:00
zdenop
cb886a04ad Merge pull request #568 from stweil/opencl
opencl: Fix runtime crash when no device was found
2016-12-15 22:00:25 +01:00
zdenop
da4c064c2e Merge pull request #531 from stweil/guards
Fix header file guards and replace reserved identifiers
2016-12-15 08:29:32 +01:00
Stefan Weil
aa964b548a opencl: Fix runtime crash when no device was found
The native CPU is always available and needs an initialized profile.

Signed-off-by: Stefan Weil <stefan.weil@bib.uni-mannheim.de>
2016-12-12 20:16:08 +01:00
Ray Smith
d55f462c9c More clang-tidy from previous commits 2016-12-06 13:45:49 -08:00
Stefan Weil
70c6f1624c Fix #define guards in header files
Some guards were missing, others were not the first statement.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 15:43:03 +01:00
Stefan Weil
dc066213c7 opencl: Replace NULL by nullptr
Remove also some unneeded nullptr assignments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-01 14:50:20 +01:00
Stefan Weil
6158f7eae2 Simplify calls of free
It is not necessary to check for null pointers.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 17:59:13 +01:00
Ray Smith
9c7e99b041 Merged with commit 4ca6ba985b 2016-11-21 08:27:02 -08:00
Ray Smith
5913d7344f Added missing license headers 2016-11-18 15:53:11 -08:00
Ray Smith
2c837dffc3 Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
Stefan Weil
a1b9e98df5 opencl: Remove unused function getNumDeviceWithEmptyScore
This fixes compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-07 09:41:05 +01:00
Stefan Weil
90dad1f2ae opencl: Fix wrong implementation of function getNumDeviceWithEmptyScore
gcc report:

opencl_device_selection.h: In function 'ds_status getNumDeviceWithEmptyScore(ds_profile*, unsigned int*)':
opencl_device_selection.h:589:13: warning: value computed is not used [-Wunused-value]
       *num++;
             ^

This is caused by a buggy implementation which increases the value of num
instead of *num.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-05 20:57:30 +01:00
gargrahul
5c6a57b727 Fixes for OpenCL issues reported on Apple Mac. Still get -54 on Apple Mac while running on OpenCL CPU, however it is ignored now. 2015-08-24 15:57:18 +05:30
zdenop
644c817f85 fix opencl endl; fix leptonica warning
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1016 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-26 17:38:37 +00:00
theraysmith@gmail.com
fec09faab9 Some formatting changes only to make it a bit more consistent with the rest of the code
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@991 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2014-01-17 18:51:27 +00:00
zdenop
8b3e590123 fix OpenCL build on OSX 10.9; add info about OpenCL to 'tesseract -v'
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@921 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-12-14 08:35:14 +00:00
zdenop
38b25b5777 fix issue 1018, 1031
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@918 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-12-06 22:07:46 +00:00
rajesh.katikam@gmail.com
983aaabaae Initial version of OpenCL support added.
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@909 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2013-11-11 17:43:13 +00:00