Reading a file in a kernel

Hi,

Firstly I’m a complete novice in CUDA.

I’d like to know if it is possible to read from a file in a CUDA device kernel function?
I know that I can read from a file on the host, copy the data to the memory on a device and then access it in the kernel.

However, it would be very useful for me to read a file directly in a kernel. Is it possible?

Why would it be useful - do you want to read a different file in each thread?

Hi,
I know that kind of question has come up in this forum several times before, so you will find a good discussion of it if you look back a couple of months

Cheers,
kbam