-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add flipr & flipud views * add fliplr & flipud functions * add fliplr & flipud eager eval * add fliplr & flipud tests * fix sycl opencl ci
- Loading branch information
Showing
10 changed files
with
1,053 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#ifndef NMTOOLS_TESTING_DATA_ARRAY_FLIPLR_HPP | ||
#define NMTOOLS_TESTING_DATA_ARRAY_FLIPLR_HPP | ||
|
||
#include "nmtools/testing/testing.hpp" | ||
|
||
NMTOOLS_TESTING_DECLARE_CASE(fliplr) | ||
{ | ||
NMTOOLS_TESTING_DECLARE_ARGS(case1) | ||
{ | ||
inline int array[2][3] = { | ||
{0,1,2}, | ||
{3,4,5}, | ||
}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case1) | ||
{ | ||
inline int result[2][3] = { | ||
{2,1,0}, | ||
{5,4,3}, | ||
}; | ||
} | ||
|
||
NMTOOLS_TESTING_DECLARE_ARGS(case2) | ||
{ | ||
inline int array[2][3][2] = { | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
}, | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
} | ||
}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case2) | ||
{ | ||
inline int result[2][3][2] = { | ||
{ | ||
{4,5}, | ||
{2,3}, | ||
{0,1}, | ||
}, | ||
{ | ||
{10,11}, | ||
{ 8, 9}, | ||
{ 6, 7}, | ||
} | ||
}; | ||
} | ||
|
||
NMTOOLS_TESTING_DECLARE_ARGS(case3) | ||
{ | ||
inline int array[2][1][3][2] = { | ||
{ | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
} | ||
}, | ||
{ | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
} | ||
} | ||
}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case3) | ||
{ | ||
inline int result[2][1][3][2] = { | ||
{ | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
} | ||
}, | ||
{ | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
|
||
#endif // NMTOOLS_TESTING_DATA_ARRAY_FLIPLR_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#ifndef NMTOOLS_TESTING_DATA_ARRAY_FLIPUD_HPP | ||
#define NMTOOLS_TESTING_DATA_ARRAY_FLIPUD_HPP | ||
|
||
#include "nmtools/testing/testing.hpp" | ||
|
||
NMTOOLS_TESTING_DECLARE_CASE(flipud) | ||
{ | ||
NMTOOLS_TESTING_DECLARE_ARGS(case1) | ||
{ | ||
inline int array[6] = {0,1,2,3,4,5}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case1) | ||
{ | ||
inline int result[6] = {5,4,3,2,1,0}; | ||
} | ||
|
||
NMTOOLS_TESTING_DECLARE_ARGS(case2) | ||
{ | ||
inline int array[2][3] = { | ||
{0,1,2}, | ||
{3,4,5}, | ||
}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case2) | ||
{ | ||
inline int result[2][3] = { | ||
{3,4,5}, | ||
{0,1,2}, | ||
}; | ||
} | ||
|
||
NMTOOLS_TESTING_DECLARE_ARGS(case3) | ||
{ | ||
inline int array[2][3][2] = { | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
}, | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
} | ||
}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case3) | ||
{ | ||
inline int result[2][3][2] = { | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
}, | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
}, | ||
}; | ||
} | ||
|
||
NMTOOLS_TESTING_DECLARE_ARGS(case4) | ||
{ | ||
inline int array[2][1][3][2] = { | ||
{ | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
} | ||
}, | ||
{ | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
} | ||
} | ||
}; | ||
NMTOOLS_CAST_ARRAYS(array) | ||
} | ||
NMTOOLS_TESTING_DECLARE_EXPECT(case4) | ||
{ | ||
inline int result[2][1][3][2] = { | ||
{ | ||
{ | ||
{ 6, 7}, | ||
{ 8, 9}, | ||
{10,11}, | ||
} | ||
}, | ||
{ | ||
{ | ||
{0,1}, | ||
{2,3}, | ||
{4,5}, | ||
} | ||
}, | ||
}; | ||
} | ||
} | ||
|
||
#endif // NMTOOLS_TESTING_DATA_ARRAY_FLIPUD_HPP |
Oops, something went wrong.