How would I write argmin or argmax with PyOpenCL? I figure I would need to calculate the argmin/min for each workgroup, and then reduce these using subsequent invocations.

有帮助吗?

解决方案

Adapt this to collect the minimum and its location rather than just the minimum.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top