I've put a discord but no result. May be here somebody could help me
When you look in the OpenCL implementation code you have two macros that seems to refer one another in some (misterious) way, I cannot see how this happens. One macro is @check define in src/ macros.jl the other one @ocl_func define in api.jl.
@check is responsible for running the clfunc => $(esc(clfunc)), but as far as I understood it is the @ocl_func macro (in the api.jl file) that will ccall the clfunc.
My question how does the 'called' clfunc, for example this one:
@check api.clGetPlatformIDs(0, C_NULL, nplatforms) (in /platforms.jl)
is passed to the @ocl_func macro?
Is it implicit( because the ocl macro is define in api so every function called with api.will activate the macro, in the example it will be then:
@ocl_func(clGetPlatformIDs(0, C_NULL, nplatforms)) )
I cannot find the code which glue the two macros. Clarifying this will help me to understand how macros work.