New feature request : global buffers

New feature request : global buffers

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

http://spectralbattle.wordpress.com/
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks for this suggestion,To betterarticulate this request, please also use the Khronos OpenCL forum.http://www.khronos.org/message_boards/viewforum.php?f=28

Leave a Comment

Please sign in to add a comment. Not a member? Join today