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
3
votes
0 answers

1D FFTs over multi-dimensional arrays using Arrayfire with Python

Using the pyfftw library, it is easy to do a 1D FFT over a single axis of a multi-dimensional array of shape (M, 2**N) without cycling over the zeroth index explicitly as follows: afft = pyfftw.interfaces.numpy_fft.fft(a, axis=1). Switching to…
user6565699
3
votes
0 answers

How to configure `arrayfire-rust` to use `cargo run`?

I'm following the arrayfire-rust guide to set up my own Rust project. I can cargo build, but when I cargo run, I get unexpected results. If I run the program directly from the shell, I get the expected results. $cargo run Finished debug [unoptimized…
shusson
  • 5,542
  • 34
  • 38
3
votes
1 answer

How avoid memcpy with flip and transpose in arrayfire?

I use arrayfire to speed up some C++ code with the help of the GPU (OpenCL). I have af::array's of 600MB and more which I need to flip along the the column dimension and then transpose it. So far I did these operations almost in place with a C++…
E. Odj
  • 81
  • 5
3
votes
3 answers

Create the imaginary unit in ArrayFire

I would like to create the imaginary unit in ArrayFire, but I can't. I can construct a complex matrix from a real matrix, but that will not be pure imaginary. Perhaps I can use function af_cplx2 from this page. I thought of the following: af_array…
Zoltán Csáti
  • 679
  • 5
  • 17
3
votes
2 answers

ArrayFire and Python

I've recently installed ArrayFire 2.1 on my Ubuntu 12.04. I want to use it with Python, is it possible? I tried ArrayFire_Python but it is incomplete, and it does not include functions such as rotate. I have exported the AF_PATH=/opt/arrayfire.…
FacundoGFlores
  • 7,858
  • 12
  • 64
  • 94
3
votes
1 answer

ArrayFire frame search algorithm crash

I am new to ArrayFire and CUDA development in general, I just started using ArrayFire a couple of days ago after failing miserably using Thrust. I am building an ArrayFire-based algorithm that is supposed to search a single 32x32 pixel frame in a…
DevtelSoftware
  • 183
  • 2
  • 9
3
votes
2 answers

Check Arrayfire Array against NaNs

I'm using Arrayfire on Python and I can't use the af.sum() function since my input array has NaNs in it and it would return NAN as sum. Using numpy.nansum/numpy.nan_to_num is not an option due to speed problems. I just need a way to convert those…
ggdm
  • 31
  • 1
2
votes
1 answer

Arrayfire C++ sparse matrix multiplication causes access violation

I am trying to work with sparse matrices in arrayfire but I am getting an access violation somewhere inside array fire dll. I used several examples but always with the same result. I can see the error on CUDA and CPU backend. Code: This is the code…
2
votes
0 answers

ArrayFire convolution issue with Cuda backend

I've been having an issue with a certain function call in the dphaseWeighted = af::convolve(dphaseWeighted, m_slowTimeFilter); which seem to produce nothing but nan's. The back ground is we have recently switched from using AF OpenCL to AF Cuda and…
2
votes
1 answer

Scatter/Gather like Numpy in ArrayFire

I want to scatter and gather elements from an array X at specific indices along one axis. So given an array of indices idx, I want to select the idx(0)th element along the 0th column, the idx(1)th element along the 1st column, etc.. In Numpy, the…
Palle
  • 11,511
  • 2
  • 40
  • 61
2
votes
1 answer

Convert af::array to af_array and back

I would like to use the ArrayFire library to run multiple artificial neural networks on the GPU in parallel. Since I am mainly a C# developer I tried to realize it via SiaNet. But I encountered the problem that SiaNet can only run one neural network…
Oliver
  • 93
  • 1
  • 7
2
votes
1 answer

Usage of unified backend in ArrayFire

I'm trying to select my arrayfire backend based on the available backends and their capability (if the backend supports doubles, then use it, else not). Therefore, I created a CMakeLists.txt-file: cmake_minimum_required(VERSION…
arc_lupus
  • 3,942
  • 5
  • 45
  • 81
2
votes
1 answer

random shuffle in RcppArrayFire

I am experiencing trouble getting this example to run correctly. Currently it produces the same random sample for every iteration and seed input, despite the seed changing as shown by af::getSeed(). #include "RcppArrayFire.h" #include…
skatz
  • 115
  • 7
2
votes
1 answer

Data transfer between LibTorch C++ and Eigen

Data transfer between LibTorch C++ and Eigen (Questions and Help) Hello all, I'm developing a Data Transfer Tools for C++ Linear Algebra Libraries, as you can see here: https://github.com/andrewssobral/dtt (considering bi-dimensional arrays or…
2
votes
0 answers

Does ArrayFire have a bounding-rect function like OpenCV?

I'm wanting to generate an approximate bounding rectangle around a binary image using ArrayFire. Basically, what OpenCV's boundingRect() function does. However, I don't see a similar function in ArrayFire. Is there a simple way to achieve this?
Farnz
  • 21
  • 2
1
2
3
12 13