cppchecker

This commit is contained in:
iceman1001 2021-02-23 23:17:22 +01:00
commit 0cad19b462
2 changed files with 3 additions and 3 deletions

View file

@ -106,7 +106,7 @@ int discoverDevices(unsigned int profile_selected, uint32_t device_types_selecte
cl_device_info ocl_devices_info[8] = { CL_DEVICE_TYPE, CL_DEVICE_NAME, CL_DEVICE_VERSION, CL_DRIVER_VERSION, CL_DEVICE_VENDOR, CL_DEVICE_LOCAL_MEM_TYPE, CL_DEVICE_MAX_WORK_ITEM_SIZES, CL_DEVICE_MAX_COMPUTE_UNITS };
unsigned int ocl_devices_info_cnt = sizeof(ocl_devices_info) / sizeof(cl_device_info);
unsigned int info_idx = 0;
unsigned int info_idx;
size_t tmp_len = 0;
char *tmp_buf = NULL;
@ -120,7 +120,7 @@ int discoverDevices(unsigned int profile_selected, uint32_t device_types_selecte
if ((*cd_ctx)[platform_idx].selected)(*selected_platforms_cnt)++;
if (verbose) printf("\n-- Platform ID: %d\n", platform_idx + 1);
if (verbose) printf("\n-- Platform ID: %u\n", platform_idx + 1);
for (info_idx = 0; info_idx < ocl_platforms_info_cnt; info_idx++) {
cl_platform_info ocl_info = ocl_platforms_info[info_idx];

View file

@ -123,7 +123,7 @@ typedef struct opencl_ctx {
bool plat_dev_enabled(unsigned int id, unsigned int *sel, unsigned int cnt, unsigned int cur_type, unsigned int allow_type);
unsigned int get_smallest_profile(compute_platform_ctx_t *cd_ctx, size_t ocl_platform_cnt);
int discoverDevices(unsigned int profile_selected, uint32_t device_types_selected, cl_uint *ocl_platform_cnt, size_t *selected_platforms_cnt, size_t *selected_devices_cnt, compute_platform_ctx_t **cd_ctx, unsigned int *plat_sel, unsigned int plat_cnt, unsigned int *dev_sel, unsigned int dev_cnt, bool verbose, bool show);
int discoverDevices(unsigned int profile_selected, uint32_t device_types_selected, cl_uint *platform_detected_cnt, size_t *selected_platforms_cnt, size_t *selected_devices_cnt, compute_platform_ctx_t **cd_ctx, unsigned int *plat_sel, unsigned int plat_cnt, unsigned int *dev_sel, unsigned int dev_cnt, bool verbose, bool show);
int runKernel(opencl_ctx_t *ctx, uint32_t cand_base, uint64_t *matches, uint32_t *matches_found, size_t id);
#endif // OPENCL_H