#include "warp_common.hh" #include #include #include #define NELEMS(array) (sizeof(array) / sizeof(array[0])) namespace cg = cooperative_groups; template class Op> const char* functorToString() { if constexpr (std::is_same, cg::plus>::value) { return "cooperative_groups::plus"; } else if constexpr (std::is_same, cg::less>::value) { return "cooperative_groups::less"; } else if constexpr (std::is_same, cg::greater>::value) { return "cooperative_groups::greater"; } else if constexpr (std::is_same, cg::bit_and>::value) { return "cooperative_groups::bit_and"; } else if constexpr (std::is_same, cg::bit_or>::value) { return "cooperative_groups::bit_or"; } else if constexpr (std::is_same, cg::bit_xor>::value) { return "cooperative_groups::bit_xor"; } assert(false && "Missing conversion to string for type"); return ""; } template