Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 API 的 clCreateImage2D 来创建空间,clEnqueueWriteImage 用于写入设备,read_imageui 用于读取内核中的图像,write_imageui 用于将图像写回主机,为图像卷积编写了代码。
现在我想使用卷积内核的结果,它指向另一个内核参数中的缓冲区。不将结果移回主机和设备。这可能吗?
如果结果来回移动......我认为它会很昂贵。
在这方面的任何帮助都将是无价的。
从主机的角度来看,您应该能够获取缓冲区对象,并将其作为参数传递给另一个内核。之后,您只需将其视为任何其他缓冲区。唯一的技巧是确保当您创建缓冲区时,它具有足够的读写权限,可以作为内核的输出和输入。