cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sajis997
Adept I

data transfer between cpu and device

Hello forum,

I guess There are two ways to transfer data between cpu and gpu in OpenCL.

1. The Natural way - clEnqueueWriteBuffer() / clEnqueueReadBuffer()

2. Map/Unmap way - clEnqueueMapBuffer()

Which one is the better option for data transfer when large amount of data will be  involved?

Thanks

Sajjad

0 Likes
1 Reply
himanshu_gautam
Grandmaster

It wont be very simple to find an answer on that, although in general Map/Unmap should be better.

The stuff you should try is to use use pinned memory for CPU while reading/writing. You can also look into zero copy buffers.

Please go through AMD APP OpenCL Programmig Guide for details.

0 Likes