We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dc298c commit 739fe76Copy full SHA for 739fe76
dpctl/tensor/libtensor/include/utils/indexing_utils.hpp
@@ -28,6 +28,7 @@
28
#include <cstdint>
29
#include <limits>
30
#include <sycl/sycl.hpp>
31
+#include <type_traits>
32
33
#include "kernels/dpctl_tensor_types.hpp"
34
@@ -46,6 +47,8 @@ namespace indexing_utils
46
47
48
template <typename IndT> struct WrapIndex
49
{
50
+ static_assert(std::is_integral_v<IndT>);
51
+
52
ssize_t operator()(ssize_t max_item, IndT ind) const
53
54
ssize_t projected;
@@ -91,6 +94,8 @@ template <typename IndT> struct WrapIndex
91
94
92
95
template <typename IndT> struct ClipIndex
93
96
97
98
99
100
101
0 commit comments