@@ -1025,6 +1025,19 @@ namespace xsimd
10251025 return _mm256_maskload_pd (mem, _mm256_castpd_si256 (mask));
10261026 }
10271027
1028+ template <class A , class T , class Mode >
1029+ XSIMD_INLINE batch<std::complex <T>, A>
1030+ load_complex_masked (std::complex <T> const * mem, batch_bool<T, A> mask, Mode mode, requires_arch<avx>) noexcept
1031+ {
1032+ using mask_register_type = typename batch_bool<T, A>::register_type;
1033+ mask_register_type nmask = mask.to_native ();
1034+ batch_bool<T, A> lo_mask = zip_lo (batch<T, A>(nmask), batch<T, A>(nmask)).to_native ();
1035+ batch_bool<T, A> hi_mask = zip_hi (batch<T, A>(nmask), batch<T, A>(nmask)).to_native ();
1036+ batch<T, A> res_lo = batch<T, A>::load (reinterpret_cast <T const *>(mem), lo_mask, mode);
1037+ batch<T, A> res_hi = batch<T, A>::load (reinterpret_cast <T const *>(mem) + mask.size , hi_mask, mode);
1038+ return detail::load_complex (res_lo, res_hi, A{});
1039+ }
1040+
10281041 // 4/8-byte ints: bitcast to same-width float, reuse the vmaskmov path.
10291042 template <class A , class T , class Mode >
10301043 XSIMD_INLINE std::enable_if_t <std::is_integral_v<T> && (sizeof (T) == 4 || sizeof (T) == 8 ), batch<T, A>>
0 commit comments