Skip to content

Fix spurious double-register instantiation in emulated batch_bool - #1454

Open
DiamonDinoia wants to merge 1 commit into
xtensor-stack:masterfrom
DiamonDinoia:fix-emulated-batch-bool
Open

DiamonDinoia wants to merge 1 commit into
xtensor-stack:masterfrom
DiamonDinoia:fix-emulated-batch-bool

Conversation

@DiamonDinoia

Copy link
Copy Markdown
Contributor

Kind of a wierd edge case but I am working on interpoperability with std-simd to allow for support for other archs that we do not support (optin) and this is the only edge case I hit.

Otherwise we are interoperable.

#include <xsimd/xsimd.hpp>
int main()
{
    using M = xsimd::batch_bool<float, xsimd::emulated<96>>;
    M const m(true);
    return m.get(2) ? 0 : 1;
}

g++-16 -std=c++17 -O2 -DXSIMD_WITH_EMULATED=1 -I upstream/include repro.cpp

…ue ctors

The unconstrained kernel::set dispatch in emulated batch_bool value ctors instantiated an unrelated batch<double, emulated<96>> register. Emulated array registers are now filled directly (is_emulated_arch<A>), so no foreign register type is instantiated.

Assisted-by: Qwen3.8-27B-FP8
@DiamonDinoia
DiamonDinoia force-pushed the fix-emulated-batch-bool branch from aac1dc3 to 3d0d65e Compare November 11, 2026 01:41

This branch has not been deployed

No deployments
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.

1 participant