Skip to content

Commit 9a0ab8e

Browse files
committed
Fix wisdom tests
1 parent 440992e commit 9a0ab8e

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

tests/wisdom.cpp

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
55

66
using namespace kernel_launcher;
77

8+
struct point3 {
9+
unsigned long long x;
10+
unsigned long long y;
11+
unsigned long long z;
12+
13+
bool operator==(point3 v) const {
14+
return x == v.x && y == v.y && z == v.z;
15+
}
16+
};
17+
18+
namespace kernel_launcher {
19+
template<>
20+
struct IntoKernelArg<point3> {
21+
static KernelArg convert(point3 value) {
22+
return KernelArg::for_scalar<point3>(value);
23+
}
24+
};
25+
} // namespace kernel_launcher
26+
827
TEST_CASE("test load_best_config") {
928
std::string wisdom_dir = __FILE__;
1029
wisdom_dir = wisdom_dir.substr(0, wisdom_dir.rfind('/'));
@@ -114,16 +133,6 @@ TEST_CASE("test KernelArg") {
114133
}
115134

116135
SECTION("scalar point3") {
117-
struct point3 {
118-
unsigned long long x;
119-
unsigned long long y;
120-
unsigned long long z;
121-
122-
bool operator==(point3 v) const {
123-
return x == v.x && y == v.y && z == v.z;
124-
}
125-
};
126-
127136
point3 input = {1, 2, 3};
128137

129138
KernelArg v = into_kernel_arg(input);

0 commit comments

Comments
 (0)