Open jonathanstrong opened 6 years ago
I couldn't work this out either, FWIW. Wasted a lot of time thinking that for_each
would do the job, before discovering that it creates a copy that is discarded, rather than mutating the vector in-place.
Mutable iterators are still a work in progress. For now, try using simd_do_each
or the immutable/functional iterators.
hey,
I have spent a few minutes trying unsuccessfully to write a simd version of code that uses ndarray's
zip_mut_with
- is there currently a way of combining asimd_iter_mut
andsimd_iter
withzip
?Essentially, I'd like to modify the elements of an array in place with an operation that uses the values in another array of the same shape.
I tried this:
and got this error:
Any recommendations for how to proceed? First time using the library, apologies if this is an obvious question.