Skip to content

Commit

Permalink
test case for failing construction of Vc::SimdArray<int,2>
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Dec 15, 2015
1 parent 02baab4 commit 8137441
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/simdarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,20 @@ TEST_TYPES(V, store, SIMD_ARRAY_LIST)
a.store(&data[1], Vc::Unaligned | Vc::Streaming);
for (size_t i = 0; i < V::Size; ++i) COMPARE(data[i + 1], T(i));
}


TEST(load_from_int_array)
{
int array[8]={1,2,3,4,5,6,7,8};
{
typedef Vc::SimdArray<int, 4> I4_t; // a 4 element int
I4_t a(array);
for (size_t i = 0; i < I4_t::Size; ++i) COMPARE(a[i], array[i]);
}
{
typedef Vc::SimdArray<int, 2> I2_t; // a 2 element int
I2_t a(array);
for (size_t i = 0; i < I2_t::Size; ++i) COMPARE(a[i], array[i]);
}
}

0 comments on commit 8137441

Please sign in to comment.