Skip to content

Commit

Permalink
Re-enable conv2d constexpr tests & remove atleast_3d (#288)
Browse files Browse the repository at this point in the history
* re-enable conv2d constexpr tests

* remove unused

* remove atleast_3d

* delete leftover files

* delete leftover files

* skip constexpr conv2d tests on nostl build

* fix constexpr conv tests on generic-ndarray test suite

* fix sycl tests
  • Loading branch information
alifahrri authored Jul 19, 2024
1 parent 773d19e commit 1bacc71
Show file tree
Hide file tree
Showing 44 changed files with 1,286 additions and 3,111 deletions.
34 changes: 0 additions & 34 deletions include/nmtools/array/array/atleast_3d.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion include/nmtools/array/eval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ namespace nmtools::meta
*
* At the moment the implementation should be working for various view type
* such as ufuncs, outer_ufuncs, accumulate_ufuncs, arange, atleast_1d, full, ones, zeros, flip.
* Some views are known to have its own specialization, such as reduce_ufuncs, atleast_2d, atleast_3d, broadcast_to.
* Some views are known to have its own specialization, such as reduce_ufuncs, atleast_2d, broadcast_to.
*
* Note that this resolver doesn't handle either type,
* the resolution of either type should be handled at the caller site.
Expand Down
129 changes: 0 additions & 129 deletions include/nmtools/array/eval/opencl/kernels/atleast_3d.hpp

This file was deleted.

1 change: 0 additions & 1 deletion include/nmtools/array/functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
#include "nmtools/array/functional/arange.hpp"
#include "nmtools/array/functional/atleast_1d.hpp"
#include "nmtools/array/functional/atleast_2d.hpp"
#include "nmtools/array/functional/atleast_3d.hpp"
#include "nmtools/array/functional/broadcast_to.hpp"
#include "nmtools/array/functional/concatenate.hpp"
#include "nmtools/array/functional/expand_dims.hpp"
Expand Down
26 changes: 0 additions & 26 deletions include/nmtools/array/functional/atleast_3d.hpp

This file was deleted.

8 changes: 0 additions & 8 deletions include/nmtools/array/view/atleast_3d.hpp

This file was deleted.

6 changes: 0 additions & 6 deletions include/nmtools/array/view/atleast_nd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ namespace nmtools::view
{
return atleast_nd(array,meta::ct_v<2>);
}

template <typename array_t>
constexpr auto atleast_3d(const array_t& array)
{
return atleast_nd(array,meta::ct_v<3>);
}
} // namespace nmtools::view

#endif // NMTOOLS_ARRAY_VIEW_ATLEAST_ND_HPP
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#ifndef NMTOOLS_TESTING_DATA_ARRAY_ATLEAST_3D_HPP
#define NMTOOLS_TESTING_DATA_ARRAY_ATLEAST_3D_HPP
#ifndef NMTOOLS_TESTING_DATA_ARRAY_ATLEAST_ND_HPP
#define NMTOOLS_TESTING_DATA_ARRAY_ATLEAST_ND_HPP

#include "nmtools/array/ndarray.hpp"
#include "nmtools/testing/testing.hpp"

NMTOOLS_TESTING_DECLARE_CASE(array, atleast_3d)
NMTOOLS_TESTING_DECLARE_CASE(array, atleast_nd)
{
using namespace literals;

NMTOOLS_TESTING_DECLARE_ARGS(case1)
{
inline int a = 1;
inline auto nd = 3_ct;
}
NMTOOLS_TESTING_DECLARE_EXPECT(case1)
{
Expand All @@ -20,6 +23,7 @@ NMTOOLS_TESTING_DECLARE_CASE(array, atleast_3d)
NMTOOLS_TESTING_DECLARE_ARGS(case2)
{
inline int a[1] = {1};
inline auto nd = 3_ct;
NMTOOLS_CAST_ARRAYS(a);
}
NMTOOLS_TESTING_DECLARE_EXPECT(case2)
Expand All @@ -32,6 +36,7 @@ NMTOOLS_TESTING_DECLARE_CASE(array, atleast_3d)
NMTOOLS_TESTING_DECLARE_ARGS(case3)
{
inline int a[2][1] = {{1},{2}};
inline auto nd = 3_ct;
NMTOOLS_CAST_ARRAYS(a);
}
NMTOOLS_TESTING_DECLARE_EXPECT(case3)
Expand All @@ -44,6 +49,7 @@ NMTOOLS_TESTING_DECLARE_CASE(array, atleast_3d)
NMTOOLS_TESTING_DECLARE_ARGS(case4)
{
inline int a[2][1][2] = {{{1,2}},{{3,4}}};
inline auto nd = 3_ct;
NMTOOLS_CAST_ARRAYS(a);
}
NMTOOLS_TESTING_DECLARE_EXPECT(case4)
Expand All @@ -56,6 +62,7 @@ NMTOOLS_TESTING_DECLARE_CASE(array, atleast_3d)
NMTOOLS_TESTING_DECLARE_ARGS(case5)
{
inline int a[2][1][2][1] = {{{{1},{2}}},{{{3},{4}}}};
inline auto nd = 3_ct;
NMTOOLS_CAST_ARRAYS(a);
}
NMTOOLS_TESTING_DECLARE_EXPECT(case5)
Expand All @@ -66,4 +73,4 @@ NMTOOLS_TESTING_DECLARE_CASE(array, atleast_3d)
}
}

#endif // NMTOOLS_TESTING_DATA_ARRAY_ATLEAST_3D_HPP
#endif // NMTOOLS_TESTING_DATA_ARRAY_ATLEAST_ND_HPP
Loading

0 comments on commit 1bacc71

Please sign in to comment.