Source: tests/jobgraph/JobID.cpp
18 #include <tests/myratest.h> 24 void check2(
const std::vector<int>& dim)
29 for (
int i = 0; i < I; ++i)
30 for (
int j = 0; j < J; ++j)
34 REQUIRE(h.unpack(IJ,0) == i);
35 REQUIRE(h.unpack(IJ,1) == j);
39 void check3(
const std::vector<int>& dim)
44 auto IJK =
pack(I,J,K);
45 for (
int i = 0; i < I; ++i)
46 for (
int j = 0; j < J; ++j)
47 for (
int k = 0; k < K; ++k)
49 auto ijk =
pack(i,j,k);
51 REQUIRE(h.unpack(IJK,0) == i);
52 REQUIRE(h.unpack(IJK,1) == j);
53 REQUIRE(h.unpack(IJK,2) == k);
59 ADD_TEST(
"JobID",
"[jobgraph]")
Pack< T, 1 > pack(const T &a)
Factory function to make a Pack<T,1>
Definition: Pack.h:62
Key type used to identify the Job's of a JobGraph.
Key type used to identify the Job's of a JobGraph.
Definition: JobID.h:60
Wraps a fixed size C-array. Think std::array, but before C++11.
Interface class for representing subranges of contiguous int's.
Results: [PASS]
Go back to Summary of /test programs.