ArrayFire:高性能并行计算软件库 ArrayFire: a high performance software library for parallel computing

ArrayFire是一款高性能并行计算库,提供易于使用的API,支持向量化操作和批处理,适用于多个领域如图像处理、信号处理等。它支持多种数据类型及CUDA、OpenCL和CPU平台。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

About ArrayFire

ArrayFire is a high performance software library for parallel computing with an easy-to-use API. Its array based function set makes parallel programming more accessible.

Installing ArrayFire

You can install ArrayFire using either a binary installer for Windows, OSX, or Linux or download it from source:

Easy to use

The array object is beautifully simple.

Array-based notation effectively expresses computational algorithms in readable math-resembling notation. You do not need expertise in parallel programming to use ArrayFire.

A few lines of ArrayFire code accomplishes what can take 100s of complicated lines in CUDA or OpenCL kernels.

ArrayFire is extensive!

Support for multiple domains

ArrayFire contains hundreds of functions across various domains including:

Each function is hand-tuned by ArrayFire developers with all possible low-level optimizations.

Support for various data types and sizes

ArrayFire operates on common data shapes and sizes, including vectors, matrices, volumes, and

It supports common data types, including single and double precision floating point values, complex numbers, booleans, and 32-bit signed and unsigned integers.

Extending ArrayFire

ArrayFire can be used as a stand-alone application or integrated with existing CUDA or OpenCL code. All ArrayFire arrays can be interchanged with other CUDA or OpenCL data structures.

Code once, run anywhere!

With support for x86, ARM, CUDA, and OpenCL devices, ArrayFire supports for a comprehensive list of devices.

Each ArrayFire installation comes with:

  • a CUDA version (named 'libafcuda') for NVIDIA GPUs,
  • an OpenCL version (named 'libafopencl') for OpenCL devices
  • a CPU version (named 'libafcpu') to fall back to when CUDA or OpenCL devices are not available.

ArrayFire is highly efficient

Vectorized and Batched Operations

ArrayFire supports batched operations on N-dimensional arrays. Batch operations in ArrayFire are run in parallel ensuring an optimal usage of your CUDA or OpenCL device.

You can get the best performance out of ArrayFire using vectorization techniques.

ArrayFire can also execute loop iterations in parallel with the gfor function.

Just in Time compilation

ArrayFire performs run-time analysis of your code to increase arithmetic intensity and memory throughput, while avoiding unnecessary temporary allocations. It has an awesome internal JIT compiler to make optimizations for you.

Read more about how ArrayFire JIT can improve the performance in your application.

Simple Example

Here's a live example to let you see ArrayFire code. You create arrays which reside on CUDA or OpenCL devices. Then you can use ArrayFire functions on those arrays.

// sample 40 million points on the GPU
array x = randu(20e6), y = randu(20e6);
array dist = sqrt(x * x + y * y);
// pi is ratio of how many fell in the unit circle
float num_inside = sum<float>(dist < 1);
float pi = 4.0 * num_inside / 20e6;
af_print(pi);

Product Support

Free Community Options
Premium Support
Contact Us
Email

Citations and Acknowledgements

If you redistribute ArrayFire, please follow the terms established in the license. If you wish to cite ArrayFire in an academic publication, please use the following reference:

Formatted:

Yalamanchili, P., Arshad, U., Mohammed, Z., Garigipati, P., Entschev, P.,
Kloppenborg, B., Malcolm, James and Melonakos, J. (2015).
ArrayFire - A high performance software library for parallel computing with an
easy-to-use API. Atlanta: AccelerEyes. Retrieved from https://github.com/arrayfire/arrayfire

BibTeX:

@misc{Yalamanchili2015,
abstract = {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.},
address = {Atlanta},
author = {Yalamanchili, Pavan and Arshad, Umar and Mohammed, Zakiuddin and Garigipati, Pradeep and Entschev, Peter and Kloppenborg, Brian and Malcolm, James and Melonakos, John},
publisher = {AccelerEyes},
title = {{ArrayFire - A high performance software library for parallel computing with an easy-to-use API}},
url = {https://github.com/arrayfire/arrayfire},
year = {2015}
}

ArrayFire development is funded by ArrayFire LLC and several third parties, please see the list of acknowledgements.



from: http://arrayfire.org/docs/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值