Is it possible to allocate a buffer that is larger than the device memory (assuming a GPU)?
I'm pretty sure this:
clCreateBuffer(context,CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,sizeof(float) * DATA_SIZE, inputdata, NULL);
does not work. but shouldn't this work?:
clCreateBuffer(context,CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR,sizeof(float) * DATA_SIZE, inputdata, NULL);
I seem to be having trouble getting it to work with my NVIDIA QUADRO FX 3800, but I heard of others that have had success allocating a buffer larger than the device memory on ATI cards.
This is not possible. The OpenCL library can not really allocate the buffer due to the physical limitation and the OpenCL library does not know anything about the subject of your code to split it for processing and merge it afterwards. You have to write the code to do this on your own with the knowledge you have from the device like CL_DEVICE_GLOBAL_MEM_SIZE.
in general you can't allocate a buffer larger than CL_DEVICE_MAX_MEM_ALLOC_SIZE which is usually smaller as CL_DEVICE_GLOBAL_MEM_SIZE. I don't know any way how to circumvent this restriction without slicing the host memory into multiple cl buffers.