- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When my OpenCL platform and device are both CPU, would the behaviour (creating buffer using CL_MEM_USE_HOST_PTR )copy another uniform data or just link to the host_ptr address without copy?
Dose any one knows?
Thank you!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel OpenCL implementation for CPU device never copies data to/from buffers unless user requested the copy explicitly by using clEnqueueRead/Write/Copy or by providing CL_MEM_COPY_HOST_PTR to clCreateBuffer call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dmitry Kaptsenel (Intel) wrote:oh,thank you.But the time by using clEnqueuewriteBuffer (CL_MEM_ALLOC_HOST_PTR) to transform data is just the same long as clCreateBuffer by using CL_USE_HOST_PTR, so that I doubt there is data copy reaction. As you say, the latter time should be much shorter. Am I right?
Intel OpenCL implementation for CPU device never copies data to/from buffers unless user requested the copy explicitly by using clEnqueueRead/Write/Copy or by providing CL_MEM_COPY_HOST_PTR to clCreateBuffer call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wang h. wrote:Sorry for the late answer. Yes, it should be shorter. But if the buffer size is not too huge and the buffer creation is not dominated by the copy operation time you will not feel a difference.
But the time by using clEnqueuewriteBuffer (CL_MEM_ALLOC_HOST_PTR) to transform data is just the same long as clCreateBuffer by using CL_USE_HOST_PTR, so that I doubt there is data copy reaction. As you say, the latter time should be much shorter. Am I right?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page