Skip to content

Implement reduce_and, reduce_or, reduce_xor - #346

Draft
Shnatsel wants to merge 3 commits into
linebender:mainfrom
Shnatsel:int-only-reductions
Draft

Implement reduce_and, reduce_or, reduce_xor#346
Shnatsel wants to merge 3 commits into
linebender:mainfrom
Shnatsel:int-only-reductions

Conversation

@Shnatsel

@Shnatsel Shnatsel commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Implement integer-only reduction ops from std::simd

There is no actual hardware support for these on neither x86 nor NEON; only SVE has these ops natively.

This emulation via slide does optimize well (as well as std::simd) but might incur non-trivial compile-time overhead; it's worth looking into replacing that with raw intrinsics.

Marking as draft until the compilation time concern is investigated and resolved.

…ombine larger Due to internal use of slide() this likely has a compile-time hit; this can probably be refactored to emit the correct shifts directly instead
@Shnatsel
Shnatsel force-pushed the int-only-reductions branch from 9fed41f to 16240c6 Compare August 24, 2026 14:38
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