char array manipulation

Discussion created by Sadikuz on Jul 9, 2011
Latest reply on Jul 11, 2011 by tonyo_au

Hi, all.


I'm a complete newbie in OpenCL and I need some help in a piece of code I'm working for practice. What I need to do is load an entire text file (~19M) in device's global memory (GPU), copy blocks of 32 or 64 (this value can change) lines to local memory and then search for a specifics therms (a customer list, with ~14000 names) in that block. So I'll have a lot threads, each one looking for a specific name. My main problem is that I don't know how to copy my text file (which is actually stored in a 2D char array in C) to device's memory. Every time I have acess restricted to the 1st element of array. Can you give some advice on how can I do this?