Commit 318574bc by Marcus Winter

mtapi_opencl_c: fixed cpplint warnings

parent cbefe5bf
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// function pointer wrappers to hide runtime linking // function pointer wrappers to hide runtime linking
#define DECLARECLFUNC( rettype, name, params ) typedef CL_API_ENTRY rettype\ #define DECLARECLFUNC(rettype, name, params) typedef CL_API_ENTRY rettype\
(CL_API_CALL *name##Proc)params;\ (CL_API_CALL *name##Proc)params;\
name##Proc name##_Dynamic = 0;\ name##Proc name##_Dynamic = 0;\
\ \
...@@ -189,8 +189,7 @@ DECLARECLFUNC(cl_sampler, clCreateSampler, (cl_context context, ...@@ -189,8 +189,7 @@ DECLARECLFUNC(cl_sampler, clCreateSampler, (cl_context context,
filter_mode, errcode_ret); filter_mode, errcode_ret);
} }
DECLARECLFUNC(cl_int, clReleaseSampler, (cl_sampler sampler)) DECLARECLFUNC(cl_int, clReleaseSampler, (cl_sampler sampler)) {
{
return clReleaseSampler_Dynamic(sampler); return clReleaseSampler_Dynamic(sampler);
} }
...@@ -240,16 +239,16 @@ DECLARECLFUNC(cl_mem, clCreateFromGLBuffer, (cl_context context, ...@@ -240,16 +239,16 @@ DECLARECLFUNC(cl_mem, clCreateFromGLBuffer, (cl_context context,
#include <Windows.h> #include <Windows.h>
#define CHECKEDIMPORT(name) name##_Dynamic = \ #define CHECKEDIMPORT(name) name##_Dynamic = \
(name##Proc)GetProcAddress( opencl_dll_handle, #name ); \ (name##Proc)GetProcAddress(opencl_dll_handle, #name); \
if ( name##_Dynamic == 0 ) return 0; if (name##_Dynamic == 0) return 0;
#else #else
#include <dlfcn.h> #include <dlfcn.h>
#define CHECKEDIMPORT(name) name##_Dynamic = \ #define CHECKEDIMPORT(name) name##_Dynamic = \
(name##Proc)dlsym( opencl_dll_handle, #name ); \ (name##Proc)dlsym(opencl_dll_handle, #name); \
if ( name##_Dynamic == 0 ) return 0; if (name##_Dynamic == 0) return 0;
#endif #endif
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
int embb_mtapi_opencl_link_at_runtime(); int embb_mtapi_opencl_link_at_runtime();
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment