Skip to content

Fix SIMD assignment to xfunctor_view destinations - #2932

Open
Alex-PLACET wants to merge 2 commits into
xtensor-stack:masterfrom
Alex-PLACET:fix-2892
Open

Fix SIMD assignment to xfunctor_view destinations#2932
Alex-PLACET wants to merge 2 commits into
xtensor-stack:masterfrom
Alex-PLACET:fix-2892

Conversation

@Alex-PLACET

Copy link
Copy Markdown
Contributor

No description provided.

xt::real(e) = w failed to compile with XTENSOR_USE_XSIMD: the SIMD
gate only probed load_simd, but the linear assigner also needs data()
on the destination, which functor views lack. Gate the SIMD paths on
data_interface_expression<E1> instead; functor views fall back to
scalar assignment while containers keep the SIMD path.

Adds a regression test (test_xcomplex.assign_to_real_part).
@codspeed-hq

codspeed-hq Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 255 untouched benchmarks


Comparing Alex-PLACET:fix-2892 (4597ce5) with master (d9a57b6)

Open in CodSpeed

static constexpr bool simd_interface()
{
return has_simd_interface<E1, requested_value_type>()
return data_interface_expression<E1> && has_simd_interface<E1, requested_value_type>()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data_interface_expression is orthogonal to simd_interface and should not be required here. What is the current issue with SIMD assignment to xfunctor_view destination?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assignment to real part of complex array failed: class xt::xfunctor_view<> has no member named ‘data’

2 participants