cudaArray size limit

Hi,

I’ve been trying to use cudaArrays and have been getting an error when allocating memory: invalid argument. I’ve read the size limit for this type in 1D is 2^13. I only allocate 196 000 bytes. Here is my code for an example:

cudaArray* SourceArray;

int width = 196000;

int height = 1;

cudaChannelFormatDesc channelDesc =

cudaCreateChannelDesc<float>();

cudaMallocArray(&SourceArray, &channelDesc, width, height);

HandleCudaErrors("Cannot allocate cuda array");

Could anybody helpe me with this?

Thanks

Passy

If you have the same problem : just found a thread in this forum that says size limit is 8K:

[url=“The Official NVIDIA Forums | NVIDIA”]The Official NVIDIA Forums | NVIDIA

Cheers,
Passy

You’re allocating 196000 floats, not bytes. For 1d or 2d arrays, that is too big. (And that’s nearly 800 MB.)