根据的说法,用CUB库减少和应该是进行并行缩减的最快方法之一。正如您在下面的片段中所看到的,执行时间是不包括第一个cub::DeviceReduce::Reduce(temp_storage, temp_storage_bytes, in, out, N, cub如果答案是肯定的,那就意味着使用CUB库变得毫无意义。, in, out, N, cub::Sum());
cudaDeviceSync
the corresponding column in dmat.void TopKPerColumn_cub_testDenseMatrix<ValueType, MemDev, Const> dmat) { int k = dtop.num_rows();
sizeof(ValueType) * n);
void* temp_s