Skip to content

New API from Upstream Release 3.7.0 #213

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

Merged
merged 6 commits into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Build and Test Wrapper
runs-on: ubuntu-18.04
env:
AF_VER: 3.6.4
AF_VER: 3.7.0
steps:
- name: Checkout Repository
uses: actions/checkout@master
Expand Down
11 changes: 9 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
edition = "2018"
name = "arrayfire"
description = "ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming simple. ArrayFire's multiple backends (CUDA, OpenCL and native CPU) make it platform independent and highly portable. A few lines of code in ArrayFire can replace dozens of lines of parallel computing code, saving you valuable time and lowering development costs. This crate provides Rust bindings for ArrayFire library."
version = "3.6.3"
version = "3.7.0"
documentation = "http://arrayfire.github.io/arrayfire-rust/arrayfire/index.html"
homepage = "https://github.com/arrayfire/arrayfire"
repository = "https://github.com/arrayfire/arrayfire-rust"
Expand All @@ -27,22 +27,25 @@ indexing = []
graphics = []
image = []
lapack = []
machine_learning = []
macros = []
random = []
signal = []
sparse = []
statistics = []
vision = []
default = ["algorithm", "arithmetic", "blas", "data", "indexing", "graphics", "image", "lapack",
"macros", "random", "signal", "sparse", "statistics", "vision"]
"machine_learning", "macros", "random", "signal", "sparse", "statistics", "vision"]

[dependencies]
libc = "0.2"
num = "0.2"
lazy_static = "1.0"
half = "1.5.0"

[dev-dependencies]
float-cmp = "0.6.0"
half = "1.5.0"

[build-dependencies]
serde_json = "1.0"
Expand Down Expand Up @@ -85,3 +88,7 @@ path = "examples/conway.rs"
[[example]]
name = "fft"
path = "examples/fft.rs"

[[example]]
name = "using_half"
path = "examples/using_half.rs"
2 changes: 1 addition & 1 deletion arrayfire
Submodule arrayfire updated 1677 files
2 changes: 1 addition & 1 deletion examples/conway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
}

fn normalise(a: &Array<f32>) -> Array<f32> {
(a / (max_all(&abs(a)).0 as f32))
a / (max_all(&abs(a)).0 as f32)
}

fn conways_game_of_life() {
Expand Down
15 changes: 15 additions & 0 deletions examples/using_half.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use arrayfire::*;
use half::f16;

fn main() {
set_device(0);
info();

let values: Vec<_> = (1u8..101).map(f32::from).collect();

let half_values = values.iter().map(|&x| f16::from_f32(x)).collect::<Vec<_>>();

let hvals = Array::new(&half_values, Dim4::new(&[10, 10, 1, 1]));

print(&hvals);
}
2 changes: 1 addition & 1 deletion scripts/generate_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# this script meant to be run from the root of arrayfire-rust

cargo rustdoc -- --html-in-header ./scripts/mathjax.script
cargo rustdoc -p arrayfire -- --html-in-header ./scripts/mathjax.script

mdbook build tutorials-book && cp -r tutorials-book/book ./target/doc/arrayfire/
9 changes: 9 additions & 0 deletions scripts/mathjax.script
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>

<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
Loading