GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - umar456/arrayfire_rust: Rust wrapper for ArrayFire

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
arrayfire @ 86426db
arrayfire @ 86426db
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.rs
build.rs
 
 

Repository files navigation

rust_arrayfire

Rust bindings for arrayfire

Currently this will most likely only work on OSX as the bindings were generated specifically for it. To make it work for your system try building bindgen and then run the following in the root directory:

bindgen  -I arrayfire/include -builtins -o src/arrayfire.rs arrayfire/include/arrayfire.h

After this you can simply:

cargo build

It does work for the first two examples in the hello_world arrayfire example:

jramapuram@gauss ~/p/rust_arrayfire> cargo run
     Running `target/debug/arrayfire`
ArrayFire v3.0.0 (CUDA, 64-bit Mac OSX, build d8d4b38)
Platform: CUDA Toolkit 7, Driver: CUDA Driver Version: 7000
[0] GeForce GT 750M, 2048 MB, CUDA Compute 3.0
Create a 5-by-3 matrix of random floats on the GPU
[5 3 1 1]
    0.7402     0.4464     0.7762
    0.9210     0.6673     0.2948
    0.0390     0.1099     0.7140
    0.9690     0.4702     0.3585
    0.9251     0.5132     0.6814

Element-wise arithmetic
[5 3 1 1]
    0.6744     0.4317     0.7006
    0.7962     0.6189     0.2905
    0.0390     0.1097     0.6549
    0.8243     0.4531     0.3509
    0.7987     0.4910     0.6299

Automatic binding generation

I have commented out the auto binding generation as the api is rather terrible now.

It doesn't work because arrayfire.h includes af/*.h files.

To overcome this you need the -I arrayfire/include directive.

I have yet to find how that works through the bindgen API

About

Rust wrapper for ArrayFire

Resources

Readme
BSD-3-Clause license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.