jjzjj

DereferencedIteratorTuple

全部标签

c++ - thrust::tuple in reduction 的自定义最小运算符

我正在尝试对zip迭代器进行最小缩减,但使用自定义运算符仅考虑元组中的第二个字段(第一个字段是键,而第二个字段是值)实际上与减少有关)但是,我无法让它工作,目前正在计算vector中存在的结果下面的代码重现了这个问题:#include#include#include#includetypedefthrust::tupleDereferencedIteratorTuple;structtuple_snd_min{__host____device__booloperator()(constDereferencedIteratorTuple&lhs,constDereferencedIter