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

Revise SIMD traits to make working with masks more ergonomic/efficient #152

Merged
merged 1 commit into from
May 5, 2024

Conversation

robertknight
Copy link
Owner

  • Add SimdMask trait for common operations on SIMD masks, eg. bitwise AND and OR.

  • Make an assumption that the SIMD mask type is always the same for a particular architecture and lane size. eg. Assume that i32xN and f32xN will use the same mask type. This avoids the need for casting masks.

  • Add SimdVal base trait which can house associated types and methods that are common to all SIMD vectors, regardless of element type.

    Initially this just defines the associated mask type, but in future it could also provide operations such as loading and storing values, and bitwise operations.

 - Add `SimdMask` trait for common operations on SIMD masks, eg. bitwise AND and
   OR.

 - Make an assumption that the SIMD mask type is always the same for a
   particular architecture and lane size. eg. Assume that i32xN and f32xN
   will use the same mask type. This avoids the need for casting masks.

 - Add `SimdVal` base trait which can house associated types and methods
   that are common to all SIMD vectors, regardless of element type.

   Initially this just defines the associated mask type, but in future it could
   also provide operations such as loading and storing values, and bitwise
   operations.
@robertknight robertknight merged commit 6893c28 into main May 5, 2024
2 checks passed
@robertknight robertknight deleted the simd-mask-and branch May 5, 2024 12:31
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