Skip to content

Commit

Permalink
[SYCL][NFC] Remove unused detail::vector_size (#15660)
Browse files Browse the repository at this point in the history
  • Loading branch information
aelovikov-intel authored Oct 11, 2024
1 parent eb24882 commit 2c7d9ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
9 changes: 0 additions & 9 deletions sycl/include/sycl/detail/type_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ template <typename T, typename R> struct copy_cv_qualifiers;
template <typename T, typename R>
using copy_cv_qualifiers_t = typename copy_cv_qualifiers<T, R>::type;

// vector_size
// scalars are interpreted as a vector of 1 length.
template <typename T> struct vector_size_impl : std::integral_constant<int, 1> {};
template <typename T, int N>
struct vector_size_impl<vec<T, N>> : std::integral_constant<int, N> {};
template <typename T>
struct vector_size
: vector_size_impl<std::remove_cv_t<std::remove_reference_t<T>>> {};

// vector_element
template <typename T> struct vector_element_impl;
template <typename T>
Expand Down
13 changes: 0 additions & 13 deletions sycl/test/type_traits/type_traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ void test_remove_pointer_t() {
"");
}

template <typename T, int Checked, bool Expected = true>
void test_vector_size() {
static_assert((d::vector_size<T>::value == Checked) == Expected, "");
}

int main() {
test_is_pointer<int *>();
test_is_pointer<float *>();
Expand Down Expand Up @@ -155,14 +150,6 @@ int main() {
test_make_unsigned_t<s::uint2, s::uint2>();
test_make_unsigned_t<const s::uint2, const s::uint2>();

test_vector_size<int, 1>();
test_vector_size<float, 1>();
test_vector_size<double, 1>();
test_vector_size<s::int2, 2>();
test_vector_size<s::float3, 3>();
test_vector_size<s::double4, 4>();
test_vector_size<s::vec<int, 1>, 1>();

#ifdef __SYCL_DEVICE_ONLY__
static_assert(
std::is_same_v<
Expand Down

0 comments on commit 2c7d9ff

Please sign in to comment.