Skip to content

Commit

Permalink
Remove unnecessary ConvertScalarTo in TestConcatOddEven
Browse files Browse the repository at this point in the history
  • Loading branch information
johnplatts committed Oct 30, 2024
1 parent d4d7467 commit 91c11d0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hwy/tests/concat_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,9 @@ struct TestConcatOddEven {
HWY_NOINLINE void operator()(T /*unused*/, D d) {
#if HWY_TARGET != HWY_SCALAR
const size_t N = Lanes(d);
const Vec<D> hi =
Iota(d,
ConvertScalarTo<T>(static_cast<size_t>(hwy::Unpredictable1()) + N -
1)); // N, N+1, ...
const Vec<D> lo =
Iota(d,
ConvertScalarTo<T>(hwy::Unpredictable1() - 1)); // 0,1,2,3,...
const Vec<D> hi = Iota(
d, static_cast<size_t>(hwy::Unpredictable1()) + N - 1); // N, N+1, ...
const Vec<D> lo = Iota(d, hwy::Unpredictable1() - 1); // 0,1,2,3,...
const Vec<D> even = Add(lo, lo);
const Vec<D> odd = Add(even, Set(d, 1));
HWY_ASSERT_VEC_EQ(d, odd, ConcatOdd(d, hi, lo));
Expand Down

0 comments on commit 91c11d0

Please sign in to comment.