cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

spectral
Adept II
Adept II

How to transfer cl_mem from a kernel to another

Hi,

I have a first kernel that use and modify the values in a cl_mem and I would like to use this 'modified' buffer in another kernel.

1 - Must I resend the cl_mem ?

2 - If yes, how ?

In fact, for now I have try to only reference the same buffer but It failed !

0 Kudos
Reply
2 Replies
himanshu_gautam
Grandmaster
Grandmaster

How to transfer cl_mem from a kernel to another

you should be able to use that buffer directly as GPUs global memory is persistent in nature.

What is the size of buffer you are using.you should be able to find many sample using buffers this way.

0 Kudos
Reply
spectral
Adept II
Adept II

How to transfer cl_mem from a kernel to another

I have found the solution. Thanks Himanshu

K

0 Kudos
Reply