OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1700 Discussions

New feature request : global buffers

Polar01
Beginner
244 Views

Hi,

In CUDA, when you declare a gpu-buffer it is accessible to all the methods of your kernel, not only the 'kernel'.

It is a problem because if you have a lot of buffers, you have to pass all the buffers pointers to every method !

The best way I have found is to create a typedef that will contains all theses pointers, if I don't want that all the methods have 40 parameters ! But it require time to initialize, to pass and some memory too. Also it will be easier if we will be able to access all theses buffers globally !

BTW, does someone know if OpenCL 2 (or a new specification) is in preparation ? Because we really miss a lot of features :-P Even if today it is more important to have stable OpenCL drivers !

typedefstruct
{
__globalData1*data1;
__globalData2*data4;
__globalData3*data3;
__globalData4*data2;
.....
}clBufferReferences;

void__kernelmain_kernel(__globalData1*data1,__globalData2*data2,__globalData3*data3,__globalData4*data4)
{
clBufferReferencesreferences;
references.data1=data1;
references.data2=data2;
references.data3=data3;
references.data4=data4;

first_method(&references);

}

Thanks

0 Kudos
1 Reply
ARNON_P_Intel
Employee
244 Views
Thanks for this suggestion,
To betterarticulate this request, please also use the Khronos OpenCL forum.
0 Kudos
Reply