Skip to content

arrayfire/arrayfire-d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArrayFire is a general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.

arrayfire-d is a D binding for ArrayFire.

Installation

Getting ArrayFire

To install arrayfire library, see resource.

Using arrayfire_d

Add arrayfire_d in dub.json as a dependency.

  "dependencies": {
    "arrayfire_d": "~>0.1.0"
  }

Specifying Backend:

ArrayFire library supports the following backends:

  • CPU : afcpu
  • OpenCL : afopencl
  • CUDA : afcuda
  • Unified backend : af

To specify the backend you want to use place it in your dub.json file.

For example, if you have a Nvidia GPU and want to use the CUDA backend:

dub.json:

{
  "name": "af_example",
  "authors": [
    "John Doe"
  ],
  "libs": ["afcuda"],
  "description": "ArrayFire Example"
}

If you specify af as ArrayFire backend, the following preference would be used by ArrayFire to harvest maximum efficiency:

  1. CUDA
  2. OpenCL
  3. CPU

LICENSE

This software is distributed under the BSD 3-Clause License.

Copyright © 2017, Prasun Anand and ArrayFire

About

D-lang bindings for arrayfire

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages