Skip to content

Commit efc2699

Browse files
authored
Updates from ArrayFire's 3.6 Release
* Bump up crate version to 3.6.0 * Update crate dependencies * Update build.rs to reflect 3.6 release * Update the submodule arrayfire to 3.6 branch * Update crate with new fns from 3.6 release * Improve build config format * Add get_last_error utility helper * Update README for 3.6 and fix style
1 parent 2bca4dc commit efc2699

File tree

12 files changed

+438
-300
lines changed

12 files changed

+438
-300
lines changed

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "arrayfire"
33
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."
4-
version = "3.5.0"
4+
version = "3.6.0"
55
documentation = "http://arrayfire.github.io/arrayfire-rust/arrayfire/index.html"
66
homepage = "https://github.com/arrayfire/arrayfire"
77
repository = "https://github.com/arrayfire/arrayfire-rust"
@@ -33,15 +33,15 @@ default = ["algorithm", "arithmetic", "blas", "data", "indexing", "graphics", "i
3333
"macros", "random", "signal", "sparse", "statistics", "vision"]
3434

3535
[dependencies]
36-
libc = "0.2.11"
37-
num = "0.1.32"
38-
lazy_static = "0.2.1"
36+
libc = "0.2"
37+
num = "0.1"
38+
lazy_static = "1.0"
3939

4040
[build-dependencies]
41-
serde_json = "1.0.0"
42-
serde_derive = "1.0.1"
43-
serde = "1.0.1"
44-
rustc_version = "0.1.7"
41+
serde_json = "1.0"
42+
serde_derive = "1.0"
43+
serde = "1.0"
44+
rustc_version = "0.2"
4545

4646
[lib]
4747
name = "arrayfire"

README.md

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
# Arrayfire Rust Bindings
2-
| Linux | Windows | OSX |
3-
|:-------:|:-------:|:---:|
4-
| [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-wrappers/rust-linux)](http://ci.arrayfire.org/view/All/job/arrayfire-wrappers/job/rust-linux/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-wrappers/rust-windows)](http://ci.arrayfire.org/view/All/job/arrayfire-wrappers/job/rust-windows/) | [![Build Status](http://ci.arrayfire.org/buildStatus/icon?job=arrayfire-wrappers/rust-osx)](http://ci.arrayfire.org/view/All/job/arrayfire-wrappers/job/rust-osx/) |
52

6-
[ArrayFire](https://github.com/arrayfire/arrayfire) is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific computing code that is portable across CUDA, OpenCL and CPU devices. This project provides Rust bindings for the ArrayFire library. Given below table shows the rust bindings compatability with ArrayFire. If you find any bugs, please report them [here](https://github.com/arrayfire/arrayfire-rust/issues).
3+
[ArrayFire](https://github.com/arrayfire/arrayfire) is a high performance
4+
library for parallel computing with an easy-to-use API. It enables users
5+
to write scientific computing code that is portable across CUDA, OpenCL
6+
and CPU devices. This project provides Rust bindings for the ArrayFire
7+
library. Given below table shows the rust bindings compatability with
8+
ArrayFire. If you find any bugs, please report them
9+
[here](https://github.com/arrayfire/arrayfire-rust/issues).
710

8-
| ArrayFire Upstream | Rust Crate |
9-
|:------------------:|:---------------:|
10-
| 3.3.x | 3.3.x |
11-
| 3.4.x | 3.4.x |
11+
| arrayfire-rust | ArrayFire |
12+
|:--------------:|:---------:|
13+
| M.m.p1 | M.m.p2 |
1214

13-
Only, Major & Minor version numbers need to match.
15+
Only, Major(M) & Minor(m) version numbers need to match. *p1* and *p2*
16+
are patch/fix updates for `arrayfire-rust` & `ArrayFire` respectively,
17+
and they don't need to match.
1418

1519
## Documentation
1620

17-
You can find the most recent updated documentation [here](http://arrayfire.github.io/arrayfire-rust/arrayfire/index.html).
21+
You can find the most recent updated documentation
22+
[here](http://arrayfire.github.io/arrayfire-rust/arrayfire/index.html).
1823

1924
## Communication
2025

@@ -27,37 +32,47 @@ Linux, Windows and OSX. Rust 1.15.1 or higher is required.
2732

2833
## Use from Crates.io [![](http://meritbadge.herokuapp.com/arrayfire)](https://crates.io/crates/arrayfire)
2934

30-
To use the rust bindings for ArrayFire from crates.io, the following requirements are to be met
31-
first.
35+
To use the rust bindings for ArrayFire from crates.io, the following
36+
requirements are to be met first.
3237

33-
1. [Download and install ArrayFire binaries](https://arrayfire.com/download) based on your operating
34-
system.
35-
2. Set the evironment variable `AF_PATH` to point to ArrayFire installation root folder.
36-
3. Make sure you add the path to library files to your path environment variables.
38+
1. [Download and install ArrayFire binaries](https://arrayfire.com/download)
39+
based on your operating system.
40+
2. Set the evironment variable `AF_PATH` to point to ArrayFire installation
41+
root folder.
42+
3. Make sure to add the path to lib files to your path environment variables.
3743
- On Linux & OSX: do `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$AF_PATH/lib`
3844
- On Windows: Add `%AF_PATH%\lib` to your PATH environment variable.
39-
4. Add `arrayfire = "3.5.0"` to the dependencies section of your project's Cargo.toml file - 3.5.0
40-
is the latest version of crate.
45+
4. Add `arrayfire = "3.6"` to the dependencies section of your project's
46+
Cargo.toml file. Make sure to change the version to latest available.
4147

42-
Once step (4) is over, you should be able to use ArrayFire in your Rust project. If you find any bugs, please report them [here](https://github.com/arrayfire/arrayfire-rust/issues).
48+
Once step (4) is over, you should be able to use ArrayFire in your Rust
49+
project. If you find any bugs, please report them
50+
[here](https://github.com/arrayfire/arrayfire-rust/issues).
4351

4452
## Build from Source
4553

46-
Edit [build.conf](build.conf) to modify the build flags. The structure is a simple JSON blob. Currently Rust does not allow key:value pairs to be passed from the CLI. To use an existing ArrayFire installation modify the first three JSON values. You can install ArrayFire using one of the following two ways.
54+
Edit [build.conf](build.conf) to modify the build flags. The structure is a
55+
simple JSON blob. Currently Rust does not allow key:value pairs to be passed
56+
from the CLI. To use an existing ArrayFire installation modify the first three
57+
JSON values. You can install ArrayFire using one of the following two ways.
4758

4859
- [Download and install binaries](https://arrayfire.com/download)
4960
- [Build and install from source](https://github.com/arrayfire/arrayfire)
5061

51-
To build arrayfire submodule available in the rust wrapper, you have to do the following.
62+
To build arrayfire submodule available in the rust wrapper, you have to do
63+
the following.
5264

5365
```bash
5466
git submodule update --init --recursive
5567
cargo build
5668
```
57-
This is recommended way to build Rust wrapper since the submodule points to the most compatible version of ArrayFire the Rust wrapper has been tested with. You can find the ArrayFire dependencies below.
69+
This is recommended way to build Rust wrapper since the submodule points to
70+
the most compatible version of ArrayFire the Rust wrapper has been tested with.
71+
You can find the ArrayFire dependencies below.
5872

59-
- [Linux dependencies](http://www.arrayfire.com/docs/using_on_linux.htm)
60-
- [OSX dependencies](http://www.arrayfire.com/docs/using_on_osx.htm)
73+
- [Linux](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Linux)
74+
- [OSX](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-OSX)
75+
- [Windows](https://github.com/arrayfire/arrayfire/wiki/Build-Instructions-for-Windows)
6176

6277
## Example
6378

@@ -86,8 +101,9 @@ Create a 5-by-3 matrix of random floats on the GPU
86101

87102
## Acknowledgements
88103

89-
The ArrayFire library is written by developers at [ArrayFire](http://arrayfire.com) LLC
90-
with [contributions from several individuals](https://github.com/arrayfire/arrayfire_rust/graphs/contributors).
104+
The ArrayFire library is written by developers at
105+
[ArrayFire](http://arrayfire.com) LLC with
106+
[contributions from several individuals](https://github.com/arrayfire/arrayfire_rust/graphs/contributors).
91107

92108
The developers at ArrayFire LLC have received partial financial support
93109
from several grants and institutions. Those that wish to receive public

arrayfire

Submodule arrayfire updated 779 files

build.conf

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
{
22
"use_lib": true,
33

4-
"build_type": "Release",
5-
"build_threads": "4",
6-
"build_examples": "OFF",
7-
"build_test": "OFF",
8-
"build_graphics": "ON",
4+
"build_type" : "Release",
5+
"build_threads" : 3,
6+
"build_cpu" : "ON",
7+
"build_cuda" : "ON",
8+
"build_opencl" : "ON",
9+
"build_nonfree" : "ON",
10+
"build_examples" : "OFF",
11+
"build_test" : "OFF",
912

10-
"glew_static": "OFF",
11-
"freeimage_type": "DYNAMIC",
12-
"cpu_fft_type": "FFTW",
13-
"cpu_blas_type": "LAPACKE",
14-
"cpu_lapack_type": "LAPACKE",
13+
"with_intelmkl" : "OFF",
14+
"with_imageio" : "ON",
15+
"with_graphics" : "ON",
16+
"with_opencl_blas_lib" : "clblast",
1517

16-
"freeimage_dir": "E:\\Libraries\\FreeImage\\Dist",
17-
"fftw_dir": "E:\\Libraries\\fftw-3.3.4",
18-
"acml_dir": "",
19-
"mkl_dir": "",
20-
"lapacke_dir": "E:\\Libraries\\lapack",
21-
"glew_dir": "E:\\Libraries\\GLEW",
22-
"glfw_dir": "E:\\Libraries\\glfw3",
23-
"boost_dir": "E:\\Libraries\\boost_1_56_0",
18+
"vcpkg_toolchain_file" : "C:/vcpkg/scripts/buildsystems/vcpkg.cmake",
2419

25-
"cuda_sdk": "/usr/local/cuda",
26-
"opencl_sdk": "/usr"
20+
"lnx_cuda_sdk": "/opt/cuda",
21+
"lnx_opencl_sdk": "/usr",
22+
"lnx_cuda_host_compiler": "/usr/bin/gcc-6",
23+
24+
"win_cuda_sdk": "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2",
25+
"win_opencl_sdk": "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v9.2",
26+
"win_cmake_generator": "Visual Studio 15 2017 Win64",
27+
"win_vs_toolset": "v140"
2728
}

0 commit comments

Comments
 (0)