OpenCL - change buffer flags -



OpenCL - change buffer flags -

is there way alter flags of opencl buffer 1 time allocated?

my utilize case following:

1) create info on device 2) big amounts of work on device said data

i want mark info cl_mem_read_only enable possible optimisations during 2, of course of study can't read-only when it's beingness created in 1.

it acceptable re-create info new read-only buffer, can't see way of doing without going via host memory.

you can't mutate flags of existing buffer. however, i think can create 2 buffers wrap same host memory. if on integrated graphics platform intel or amd , utilize cl_mem_use_host_ptr, can create read-write buffer wraps piece of host memory. (the usual constraints apply: has page-aligned , cacheline length on intel, not sure amd's). can create sec buffer wrapping same part different options (read only) , utilize separately.

it's illegal utilize overlapped regions in different enqueues @ same time.

the result of opencl commands operate on multiple buffer objects created same host_ptr or overlapping host regions considered undefined.

(from createbuffer) barring that, should work.

however, in end, suspect won't gain anything. implementations free ignore these flags. , suspect overlap case above forcefulness implementation ignore them (set page access to the lowest degree restrictive combination of buffers mapping it). integrated gpus ignore flags (i think intel does).

what sort of optimizations hoping for?

opencl

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -