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

Adds boolean methods to u32x4 and u32x8 #161

Merged
merged 2 commits into from
Aug 12, 2024
Merged

Conversation

andyquinterom
Copy link
Contributor

Closes #160

@Lokathor
Copy link
Owner

Lokathor commented Jun 5, 2024

This looks good so far, but you should puy a doc comment on each of these which explains what's going on

@mcroomp
Copy link
Contributor

mcroomp commented Jun 7, 2024

Do you think it would be cleaner to use the i32 versions of these since the implementation is identical, avoid code duplication ie:

   #[inline]
  #[must_use]
  pub fn move_mask(self) -> i32 {
    // no need to reinvent the wheel
    i32x4::move_mask(cast(self))
  }

  #[inline]
  #[must_use]
  pub fn any(self) -> bool {
    i32x4::any(cast(self))
  }

  #[inline]
  #[must_use]
  pub fn all(self) -> bool {
    i32x4::all(cast(self))
  }

  #[inline]
  #[must_use]
  pub fn none(self) -> bool {
    i32x4::none(cast(self))
  }

@Lokathor
Copy link
Owner

Lokathor commented Jun 7, 2024

Yeah that's probably good.

@Lokathor Lokathor merged commit d00b0be into Lokathor:main Aug 12, 2024
22 checks passed
@Lokathor
Copy link
Owner

released 0.7.27

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

Successfully merging this pull request may close these issues.

Add methods from i32x4 for u32x4
3 participants