-
Notifications
You must be signed in to change notification settings - Fork 77
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
1.0 #138
Conversation
These changes are great! I have pointed my local project to the
Would it be possible to extend the Currently it supports only Let me know if this is the right place for such a request, or if you want me to create a separate issue for this. |
#133 would be very helpful for several of us |
Yes, quite easily. I'm considering making that the default, as let value = arr![1u8, 2, 3, 4]; // GenericArray<u8, U4>
let value = arr![1, 2, 3, 4]; // GenericArray<i32, U4>, because i32 is the default integer type
let value = arr![1f32; U16]; // GenericArray<f32, U16>
let value: GenericArray<usize, _> = arr![4, 5, 6, 7]; // GenericArray<usize, U4> |
I have changed the If there is opposition to this change, I can always revert it, but I feel like it's an improvement. |
I've been experimenting with implementing It does turn out I can cheat and use a |
After some testing, it seems safe enough to expose Could possibly provide a solution to #108 by avoiding the stack entirely for very large (but fixed-size) arrays. Diminishing returns in usefulness of |
After idly looking through the docs, I've decided to remove |
Would anyone else subscribed to this PR care to look over the code? More eyes the better. |
I thought I'd fixed this years ago, but as it was there were some obvious autovectorization misses with For example, before my latest commits, this code: pub fn add64(x: GenericArray<f32, U64>, y: GenericArray<f32, U64>) -> GenericArray<f32, U64> {
x.zip(y, |a, b| a + b)
} would result in 64 serial Now it correctly autovectorizes to 8 EDIT: This may have been a regression in Rust/LLVM itself, as Rust 1.65.0 generates basically the same assembly for both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me in general, just a few small comments. Thanks again for all your hard work on this crate!
With #137, this opens up the opportunity for a full 1.0 release with much-improved ergonomics.
CHANGELOG.md
What other changes should we make while we can?
Closes #145
Closes #140
Closes #137
Closes #135
Closes #132
Closes #119
Closes #117
Closes #109
Closes #107
Closes #101
Additional tweaks:
N <= 1024
rather thanN < 1024
fn main()
, etc.)min_const_generics
transmute
function to verify type sizes.ArrayType
implementations Sealed + unreachable Clone methodsFromIterator
and deserialization routinestry_from_slice
)GenericArray::len()
associated method without&self
Remaining todos:
Update DESIGN.mdMoved into main docs.