Add test_ste_intersection_key_value and key_value in test utils
MODIFY
test/test_utils.hpp
test/test_utils.hpp
@@ -195,3 +195,51 @@ struct FixedVector
return true;
}
};
+
+template <typename Key, typename Value>
+struct key_value
+{
+ typedef Key key_type;
+ typedef Value value_type;
+
+ __host__ __device__ key_value(void)
+ : key()
+ , value()
+ {
+ }
+
+ __host__ __device__ key_value(key_type k, value_type v)
+ : key(k)
+ , value(v)
+ {
+ }
+
+ __host__ __device__ bool operator<(const key_value& rhs) const
+ {
+ return key < rhs.key;
+ }
+
+ __host__ __device__ bool operator>(const key_value& rhs) const
+ {
+ return key > rhs.key;
+ }
+
+ __host__ __device__ bool operator==(const key_value& rhs) const
+ {
+ return key == rhs.key && value == rhs.value;
+ }
+
+ __host__ __device__ bool operator!=(const key_value& rhs) const
+ {
+ return !operator==(rhs);
+ }
+
+ friend std::ostream& operator<<(std::ostream& os, const key_value& kv)
+ {
+ return os << "(" << kv.key << ", " << kv.value << ")";
+
+ }
+
+ key_type key;
+ value_type value;
+};
\ No newline at end of file

Add test_ste_intersection_key_value and key_value in test utils