How to allocate cudaArrays? I’m particularly interested in allocating 1D array. After allocation how to access simple elements of it? I read CUDA programming guide but I’m not getting it fully. Can anybody please explain with sample code. Is using cuda1Darray recommended?
How to allocate cudaArrays ? I’m particularly interested in allocating 1D array. After allocation
Share
cudaArrays are special structures, optimized for texture fetching. You can allocate 1D cudaArray as follows:
The width and height is the number of elements in the x and y directions.
In the kernel, the elements of this array can be accessed by using
tex1Dortex2Dfunctions. cudaArrays can only be read inside device code using these functions.