Spindle

Spindle is a Rust crate simplifies GPGPU multithreaded execution of embarrassingly parallel and (soon) data parallel tasks.

```rust

[spindle::basic_range]

fn squareovertwo(x: i32) -> i32 { (x * x) / 2 }

fn main() { let foo = unsafe { 33.squareovertwo() }.unwrap(); println!("{foo:?}"); let bar: Box<[; 33]> = unsafe { _squareover_two() }.unwrap(); println!("{bar:?}"); } /* [0, 0, 2, 4, 8, 12, 18, 24, 32, 40, 50, 60, 72, 84, 98, 112, 128, 144, 162, 180, 200, 220, 242, 264, 288, 312, 338, 364, 392, 420, 450, 480, 512] [0, 0, 2, 4, 8, 12, 18, 24, 32, 40, 50, 60, 72, 84, 98, 112, 128, 144, 162, 180, 200, 220, 242, 264, 288, 312, 338, 364, 392, 420, 450, 480, 512] */ ```

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 or the MIT license, at your option. This file may not be copied, modified, or distributed except according to those terms.

Contributing

Contributions are welcome! If you have any ideas for new features or improvements, feel free to open an issue or submit a pull request.

Acknowledgments

Spindle was inspired by many! todo!()