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>
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>