New Features in ArrayFire

Pavan YalamanchiliArrayFire 2 Comments

We have previously talked about upcoming computer vision algorithms in the next version of ArrayFire. Today we are going to discuss some of the bigger changes and additions to ArrayFire.

New CPU backend

In addition to CUDA and OpenCL backends, you can now run ArrayFire natively on any CPU. This is another step we’ve taken in our efforts to make ArrayFire truly portable. The biggest benefits the new CPU backend include:

  • Hardware and Software neutrality: You can now build and ship applications without worrying about the hardware and drivers preset on end users’ machines. You can also port your applications easily to embedded and mobile platforms where CUDA and OpenCL may not be available.

  • Heterogeneous Computing: It is now easier to get higher utilization on your compute server / cluster. The ability to run the same code across CPUs, GPUs, and accelerators reduces development time.

Improvements to the C API

A cleaner and simpler C API allows you to build wrappers for higher level languages in an easier manner. Some of the highlights of the upcoming C API include:

  • An af_array handle that stores the metadata such as array dimensions and data type
  • Just In Time compilation support
  • Arithmetic, numerical, trigonometric, and other mathematical functions
  • Statistics functions and set operations
af_array A, B, C;

// Create af_array from host data
float *h_A = {0, 1, 2, 3, 4, 5};
dim_type a_dims[] = {2, 3};
af_create_array(&A, h_A, 2, a_dims);

// Create a random array on the device
dim_type b_dims[] = {3, 3};
af_randu(&B, 2, b_dims, f32);

// Perform matrix multiplication
af_matmul(&C, A, B, AF_NO_TRANSPOSE, AF_NO_TRANSPOSE);

More coming

This is just a teaser to bigger and better things coming from us in the near future. If you have any questions please contact us!

  • technical@arrayfire.com: Technical questions about ArrayFire.
  • sales@arrayfire.com: Questions about sales and licensing of ArrayFire

Comments 2

  1. Pingback: New Features Coming To ArrayFire • Atlanta Tech Blogs

  2. Pingback: ArrayFire is Now Open Source | ArrayFire

Leave a Reply

Your email address will not be published. Required fields are marked *