Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

haydnv/afarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

afarray

Convenience methods for working with ArrayFire arrays in Rust, compatible with number-general.

Usage example:

use std::iter::FromIterator;
use afarray::Array;
use number_general::Number;

let a = [1, 2, 3];
let b = [5];

let product = &Array::from(&a[..]) * &Array::from(&b[..]);
assert_eq!(product, Array::from_iter(vec![5, 10, 15]));
assert_eq!(product.sum(), Number::from(30))

Note that you must have ArrayFire installed in order to build this crate. The installation instructions are at http://arrayfire.org/docs/installing.htm.

You can find detailed instructions for building the Rust arrayfire crate from crates.io at: https://crates.io/crates/arrayfire.

About

Convenience methods for working with ArrayFire arrays in Rust

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages