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
1
vote
0 answers

ArrayFire OpenCL Issue

I have installed ArrayFire 3.8.0 using the binary installer as per the instructions mentioned in the documentation. All dependencies were installed before installing it. NVIDIA CUDA Toolkit 11.3 is also installed. Installation was successful. To…
1
vote
0 answers

ArrayFire Matrix Multiplication Vectorization

I am using ArrayFire library for signal processing. I am just curious about how to make more efficient my code. I read vectorization guide in docs, but i just ended up using gfor construct. Is it possible to improve efficiency ? Is there a better…
calynr
  • 1,264
  • 1
  • 11
  • 23
1
vote
1 answer

ArrayFire's matrix multiplication with integer inputs

I want to perform matrix by vector multiplication but on arrays with integer types to avoid extra conversion (it works fine when both sides are of type f32); Such operation throws bad type exception for integer types, is there any workaround?
Mehran Khazaeizadeh
  • 1,021
  • 1
  • 7
  • 13
1
vote
1 answer

Arrayfire python rowwise addition and multiplication

I'm trying to learn the Arrayfire idioms by translating some vectorised numpy code. For example, this is valid rowwise addition and multiplication in numpy, >>> a = np.array([1,2,3]) >>> a array([1, 2, 3]) >>> b = np.arange(9).reshape((3, 3)) >>>…
Daniel Farrell
  • 9,316
  • 8
  • 39
  • 62
1
vote
1 answer

Cast ArrayFire Array Data from f64 to f32 in C++

I have an ArrayFire array of dtype=f64 that I need to cast to dtype=f32. I'm not sure how to do this other than converting to a host array and iterating through doing a static_cast. I'm sure there is a better way. I found af_cast but it seems to…
nalyd88
  • 4,940
  • 8
  • 35
  • 51
1
vote
1 answer

"afcl" namespace missing in ArrayFire 3.7.2

In the official docs there are functions like afcl::getContext. But when I #include , I don't get access to any afcl namespace. How do I access such functions?
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
1
vote
1 answer

How do I convert ArrayFire Image to Julia Image?

I want to use the plotting functionality of Plots.jl with an image loaded using the load_image() function of ArrayFire. What I have is : AFArray: 1000×300×3 Array{Float32,3} What I want is : 300×1000 Array{RGB{Any},2} with eltype RGB I couldn't be…
atachsin
  • 173
  • 10
1
vote
0 answers

How to correctly perform atomic operations with ArrayFire?

How can I perform atomic operations like atomicCAS with ArrayFire to avoid locking? (that is the same across all backends)
Mehran Khazaeizadeh
  • 1,021
  • 1
  • 7
  • 13
1
vote
1 answer

ArrayFire array calculated data differs over executions although usage of sync and eval methods

I want to convert text data into corresponding values (vectorized), but final data is not filled all the time, it seems that if there is some latency it has time to fill the result array otherwise it completes just a portion of the final data…
Mehran Khazaeizadeh
  • 1,021
  • 1
  • 7
  • 13
1
vote
1 answer

Set a index value with Arrayfire

I am trying to modify a value in an existing Arrayfire Matrix with a custom value. Below is an example of changing several rows and columns to a specified value (1.0) However I am struggling no doing two things: Change the dimensions of the area to…
ExtaticGUR
  • 31
  • 4
1
vote
0 answers

Rust Arrayfire Closure multiplication

I am attempting to multiply an arrayfire Matrix by a matrix of closures. Is there anyway to achieve this without using for loops? My current code is as follows: //Initialize the closures and assign to an arry let a = |x| {x*2.0}; let b = |x|…
ExtaticGUR
  • 31
  • 4
1
vote
0 answers

Expanding arrays of intervals in Arrayfire

I have three Arrayfire arrays that look like this: Array 1 Array 2 Array 3 20 5 9 3 0 0 9 4 8 0 20 22 ... ... ... Using Arrayfire, I would like to generate 2 new arrays. The first…
1
vote
0 answers

Coupling arrayfire with boost::odeint

I wrote a function incorporating several calls to 2d-ffts and matrix-vector-multiplications in C++, using arrayfire, such that I can run and compile the program both on the CPU and GPU. Reason for that is that my dev. PC does not have a GPU, but my…
arc_lupus
  • 3,942
  • 5
  • 45
  • 81
1
vote
1 answer

Problem adapting MatchedFilter algorithm for new ArrayFire version

I am trying to adapt the matched filter algorithm (given here) for arrayfire version 3.6.4. Here is what I ended up with: #include using namespace af; struct SAR_data { //! SAR data structure format double deltaF; //! step size…
pem
  • 365
  • 2
  • 12
1
vote
1 answer

ArrayFire Exception (Input types are not the same)

I am trying to figure out use of arrayfire library and I have written following small code snippet to create a 2D plot like af::info(); af::Window myWindow(800, 800, "2D Plot example: ArrayFire"); myWindow.grid(3, 1); std::vector
Random
  • 33
  • 8