我想做并行减少,但在我的内核内部,数据在共享内存中。推力库可以做到这一点吗?就像是
int sum = thrust::reduce(myIntArray, myIntArray+numberOfItems, (int) 0, thrust::max_element<int>());
但这在内核中不起作用。可能吗?谢谢你。
我想做并行减少,但在我的内核内部,数据在共享内存中。推力库可以做到这一点吗?就像是
int sum = thrust::reduce(myIntArray, myIntArray+numberOfItems, (int) 0, thrust::max_element<int>());
但这在内核中不起作用。可能吗?谢谢你。