Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename x86_64 SIMD module, split Self / Mask types #34

Merged
merged 3 commits into from
Jan 6, 2024

Conversation

robertknight
Copy link
Owner

This contains some cleanup of the portable SIMD modules after adding ARM implementations yesterday:

  • Document what the simd_vec module is for
  • Rename simd_vec::{avx => x86_64} to match the other architecture-specific modules
  • Separate out the Self and Mask types in SIMD operations. For AVX 2 / WASM these are the same, but not for ARM or primitives, so the code had unnecessary conversions. Plus the function signatures are clearer if using a separate type.

Make the naming of the ARM and Intel-specific modules consistent by using the
Rust architecture name.
For WebAssembly and AVX2, the `Self` type can also be used as the SIMD mask
type. However for i32/f32 and ARM the code had to convert to/from the actual
mask type (bool and uint32_t respectively) to the `Self` type.  Remove this
unnecessary conversion and make the APIs clearer by introducing a separate
`Mask` associated type for SIMD vectors.
@robertknight robertknight merged commit 4ea8610 into main Jan 6, 2024
1 check passed
@robertknight robertknight deleted the x86_64-rename branch January 6, 2024 08:04
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