Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

Handle many kernel arguments in OCL Kernel

$
0
0

Dear all,

I am developing an OpenCL kernel for particle simulation and I face a problem. I have to transfer a lot of arguments to the device (I have not counted properly, but from the original code it could be more than 20 or 30 float arrays). Could you suggest me a way to handle properly such amount of arguments without having to call clSetKernelArgument() and clEnqueueWriteBuffer() more than 20 times?.

The original code was written in Fortran, where the data was stored inside COMMON blocks, therefore one approach that I used was to use Fortran/C interoperability and store the arguments inside the proper structs and then pass the structs to the kernel. I wrote a C source file to handle all the OpenCL execution and then I return the results to the Fortran code for post-processing... what would you suggest to me?

Thanks for your help!, best regards!


Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>