Lokathor / wide

A crate to help you go wide. By which I mean use SIMD stuff.
https://docs.rs/wide
zlib License
298 stars 25 forks source link

Minor fixes #52

Closed ronniec95 closed 4 years ago

ronniec95 commented 4 years ago

For consistency

Moved polynomial_4 to lib.rs so it can be used with f64x* later Made sign_bit public which was an oversight on my part

Lokathor commented 4 years ago

This is good work.

The one note I think I'd make is that the i8x32 (and perhaps other types) has alignment that changes based on if avx2 is available or not. I think that we should use repr(C, align(x)) to set the alignment to always be the higher value, just to keep it consistent across platforms.

Similarly, f32x4 has align 16 on all platforms, but actually on ARM the type would only need to be align 8 (assuming that rust had ARM instrinsics in stable and such).

ronniec95 commented 4 years ago

I'll look at the alignment over the next few days. Let this cook for a bit, I'm adding features as I use them in my main project and I'm finding bugs; so wait a week or so before merging this

I think the bool types would definitely help me...if you planning to do them anytime soon?

Lokathor commented 4 years ago

they shouldn't be hard but it's breaking is all. I can probably do it this weekend.

Lokathor commented 4 years ago

In https://github.com/Lokathor/wide/pull/53 you said that this should be merged first. Is this one ready?

ronniec95 commented 4 years ago

I've been using for 4 days or so against my code and seems ok. Obviously it's not battle tested, but good enough for now.