Questions tagged [arrayfire]

ArrayFire is a software library that simplifies GPU computing.

From the github page:

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.

Useful Links:

182 questions
2
votes
1 answer

How to explicitly get linear indices from arrayfire?

Suppose I have an stl::array foo which is the linearized STL pendant to a Column-Major format arrayfire array, e.g. af::array bar = af::array(4,3,2, 1, f32);. So I have an af::dim4 object dims with the dimensions of bar, I have up to 4…
E. Odj
  • 81
  • 5
2
votes
1 answer

Does Arrayfire python support multi-GPU programming

I am trying to use arrayFire python (https://github.com/arrayfire/arrayfire-python) for multi-GPU programming. However, when I try to interface it with the concurrent futures (https://docs.python.org/3/library/concurrent.futures.html) library, I…
2
votes
0 answers

ArrayFire.jl setindex! very slow

So I'm trying to speed up some Julia code using ArrayFire.jl, but instead all I'm doing is slowing it down. Using @profile, I've tracked the problem down to setindex!. Here is the test code: using ArrayFire function f(x::Array{Float32}) y =…
Set
  • 934
  • 6
  • 25
2
votes
0 answers

Setting up Eclipse for ArrayFire on Linux

I am trying to set up Eclipse (Mars 2.0) on Ubuntu 14.04 in order to compile and run C/C++ applications with ArrayFire utilities. I have already installed ArrayFire on my computer in /opt/ARRAYFIRE/arrayfire-3 and I'm trying first a very simple…
2
votes
1 answer

Implementing convolutional neural network backprop in ArrayFire (gradient calculation)

I modified equation 9.12 in http://www.deeplearningbook.org/contents/convnets.html to center the MxN convolution kernel. That gives the following expression (take it on faith for now) for the gradient, assuming 1 input and 1 output channel (to…
Walt Donovan
  • 357
  • 1
  • 10
2
votes
0 answers

How to configure arrayfire-rust to use CUDA?

I've installed the latest official CUDA (7.5) and ArrayFire (Linux v3.3.1 64-bit) on Ubuntu 15.10. I am using the default configuration following the official documentation. When I build the arrayfire-rust library and run the "unified" example in…
fuying
  • 21
  • 2
2
votes
1 answer

Arrayfire error with conditionals

I am trying to saturate my arrays in ArrayFire. I want all values greater than 0.75 to saturate to 1.0 and all less than 0.25 to saturate to 0.0. I am using the following expressions. a(a > 0.75) = 1.0; a(a < 0.25) = 0.0; Here is is an…
chasep255
  • 11,745
  • 8
  • 58
  • 115
2
votes
0 answers

Large scale parallel 1D convolution

I'm using ArrayFire (OpenCL, not cuda) right now and I was wondering if there's any way to perform several parallel 1D convolutions (to calculate moving avg) of a really large (50M+ 32bit float) vector. I've saw some examples but with the recent…
papanoel87
  • 131
  • 1
  • 12
2
votes
2 answers

Where is arrayfire/lib64 and libafcu?

After I build and install arrayfire, and I read the complete documentation in http://www.arrayfire.com/docs/createprojects.htm#createprojects_linux, bur I could not find the arrayfire/lib64 in my computer, so how to set up Environment Variable…
jeffrey p
  • 31
  • 2
2
votes
0 answers

Downsample with arrayfire

How can I downsample a temporal signal with arrayfire? To avoid anti aliasing, I should do a lowpass filter before dropping samples, but I didn't see anything like that in the API. Thanks.
Ran
  • 4,117
  • 4
  • 44
  • 70
2
votes
1 answer

Timing in ArrayFire

I'm trying to evaluate the performance of simple GPU elementwise matrix operations with ArrayFire. In particular, considering int N1 = something; int N2 = something; array A_D = constant(1.,N1*N2,1,f64); array B_D = constant(1.,N1*N2,1,f64); array…
Vitality
  • 20,705
  • 4
  • 108
  • 146
2
votes
0 answers

Largest eigenvalues (and corresponding eigenvectors) in ArrayFire

Given a square matrix A, I need to obtain a diagonal matrix D that contains A's 5 largest magnitude eigenvalues and a matrix V whose columns are the corresponding eigenvectors. In Matlab the code is [V,D] = eigs(A,5). Is there a similar function in…
Alexey
  • 5,898
  • 9
  • 44
  • 81
1
vote
0 answers

arrayfire with python freeze

I have just downloaded Arrayfire library from acclereyes. Arrayfire is a CUDA based library and i am using it from python.I tried to run the simplest possible code in python: import arrayfire as af a=af.randu(5) the prompt hangs and my cpu usage is…
linuS
  • 171
  • 1
  • 8
1
vote
0 answers

Matlab mldivide and arrayfire solve

I am trying to port some Matlab code to c++ using arrayfire. In one place the Matlab code is like: tmp = (R\v0); where R is a 9x9 complex double and v0 is a 9x1 complex double. in my arrayfire the code as written reads: af::array tmp = af::solve(R,…
1
vote
1 answer

How to use ArrayFire batched 2D convolution

Reading through ArrayFire documentation, I noticed that the library supports batched operations when using 2D convolution. Therefore, I need to apply N filters to an image using the C++ API. For easy testing, I decided to create a simple Python…
Gustavo Stahl
  • 101
  • 1
  • 7