Today we are announcing the release of ArrayFire version 3.6. The official binary installers can be downloaded here:

https://sandbox.arrayfire.com/downloads

We added several new features that improve the performance and usability of the ArrayFire library. The main features are:
<ul>
 	<li>Support for batched matrix multiply</li>
 	<li>Added the topk function</li>
 	<li>Added the anisotropic diffusion filter</li>
</ul>
The new batch functionality allows you to perform several matrix multiplication operations in one call of matmul. You might want to call this function if you are performing multiple smaller matrix multiplication operations. Here is an example:
<pre class="lang:c++ decode:true" title="Batched matrix multiply">// Create a 3x3x2 matrix
array a = randu(3, 3, 2);
array b = randu(3, 3, 2);

array c = matmul(a, b);
</pre>
The example above is creating 2 3 by 3 matrices as a 3x3x2 volume for a and b. The matmul function then multiplies the slice of the a volume with the corresponding slice in b. Which this approach you can reach higher efficiencies with smaller matrices. Here are some benchmarks for the batched matmul for different sizes of a matrix.

<a href="https://sandbox.arrayfire.com/wp-content/uploads/2018/05/chart.png"><img class="aligncenter wp-image-9790 size-full" src="https://sandbox.arrayfire.com/wp-content/uploads/2018/05/chart.png" alt="A comparison between matmul and batched matmul" width="600" height="371" /></a>

The batched calls allow you to reach higher computational efficiencies because we are able to better distribute the work across the GPU.

The topk function is another exciting function that is included in this release. This function returns the top k most maximum or minimum values in a vector or matrix across a given dimension. Here is an example.

&nbsp;

&nbsp;