rust-ndarray / ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations
https://docs.rs/ndarray/
Apache License 2.0
3.43k stars 295 forks source link

Made compatible with thumbv6m-none-eabi #1384

Open BjornTheProgrammer opened 2 months ago

BjornTheProgrammer commented 2 months ago

Changes

Add the crates portable-atomic and portable-atomic-util to make the Arc used in the code compatible with the thumbv6m-none-eabi target. Also note that this change will probably make ndarray work on more targets than just the thumbv6m-none-eabi target.

Considerations

Those two crates are imported from a GitHub revision. It might be best to wait for an official release to crates.io, but I'm not sure if that's important.

This has also been tested and confirmed to work on a Raspberry Pi Pico.

antimora commented 1 month ago

Burn project's Ndarray backend would very much appreciate if this PR is merged. We have a long outstanding issue: https://github.com/tracel-ai/burn/issues/302

BjornTheProgrammer commented 1 month ago

@bluss, do you have any more concerns about this pull request? If so, I would love to see if I can address them!