Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/xsimd/types/xsimd_complex_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ namespace xsimd
explicit simd_complex_batch(const value_type& v);
explicit simd_complex_batch(const real_value_type& v);
explicit simd_complex_batch(const real_batch& re);
explicit simd_complex_batch(const real_value_type* v) : simd_complex_batch(real_batch(v)) {}
simd_complex_batch(const real_batch& re, const real_batch& im);
simd_complex_batch(const real_value_type* re, const real_value_type* im) : simd_complex_batch(real_batch(re), real_batch(im)) {}

real_batch& real();
real_batch& imag();
Expand Down
10 changes: 8 additions & 2 deletions test/test_batch_complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,17 @@ class batch_complex_test : public testing::Test
tmp[i] = value_type(real[i]);
}

batch_type b2(real_batch_type(real.data()));
batch_type b2(real.data());
EXPECT_EQ(b2, tmp) << print_function_name("batch(real_batch)");

batch_type b3(real_batch_type(real.data()), real_batch_type(imag.data()));
batch_type b3(real.data(), imag.data());
EXPECT_EQ(b3, lhs) << print_function_name("batch(real_batch, real_batch)");

batch_type b4(real_batch_type(real.data()));
EXPECT_EQ(b4, tmp) << print_function_name("batch(real_ptr)");

batch_type b5(real_batch_type(real.data()), real_batch_type(imag.data()));
EXPECT_EQ(b5, lhs) << print_function_name("batch(real_ptr, real_ptr)");
}

void test_access_operator() const
Expand Down