@@ -48,8 +48,8 @@ TEST(TestTensorFormat, TestRowMajor) {
4848
4949 auto layout = format.layout ();
5050 auto off1 =
51- AbstractLayoutProvider<RowMajorLayout>::offset (Dim2 (1_c, 2_c), layout );
52- auto off2 = RowMajorLayout::offset (Dim2 (1_c, 2_c), layout );
51+ AbstractLayoutProvider<RowMajorLayout>::offset (layout, Dim2 (1_c, 2_c));
52+ auto off2 = RowMajorLayout::offset (layout, Dim2 (1_c, 2_c));
5353 static_assert (off1 == off2);
5454 static_assert (off1 == 6_c);
5555}
@@ -64,8 +64,8 @@ TEST(TestTensorFormat, TestColMajor) {
6464
6565 auto layout = format.layout ();
6666 auto off1 =
67- AbstractLayoutProvider<ColMajorLayout>::offset (Dim2 (1_c, 2_c), layout );
68- auto off2 = ColMajorLayout::offset (Dim2 (1_c, 2_c), layout );
67+ AbstractLayoutProvider<ColMajorLayout>::offset (layout, Dim2 (1_c, 2_c));
68+ auto off2 = ColMajorLayout::offset (layout, Dim2 (1_c, 2_c));
6969 static_assert (off1 == off2);
7070 static_assert (off1 == 5_c);
7171}
@@ -99,7 +99,7 @@ TEST(TestTensorFormat, TestOffset1) {
9999 auto pos = Dim2 (row, col);
100100 using LayoutProvider =
101101 typename format_traits<decltype (format1)>::layout_provider_type;
102- auto offset = LayoutProvider::offset (pos, layout1 );
102+ auto offset = LayoutProvider::offset (layout1, pos );
103103 static_assert (offset == row * 4_c + col);
104104 // std::cout << "offset: " << offset << std::endl;
105105 });
@@ -122,7 +122,7 @@ TEST(TestTensorFormat, TestOffset2) {
122122 auto pos = Dim2 (row, col);
123123 using LayoutProvider =
124124 typename format_traits<decltype (format1)>::layout_provider_type;
125- auto offset = LayoutProvider::offset (pos, layout1 );
125+ auto offset = LayoutProvider::offset (layout1, pos );
126126 static_assert (offset == col * 2_c + row);
127127 // std::cout << "offset: " << offset << std::endl;
128128 });
0 commit comments