Giter Site home page Giter Site logo

melonakos / arrayfire Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arrayfire/arrayfire

0.0 0.0 0.0 19.2 MB

ArrayFire: a general purpose GPU library.

Home Page: https://arrayfire.com

License: BSD 3-Clause "New" or "Revised" License

CMake 4.05% C 6.80% C++ 84.59% Cuda 4.49% Python 0.06% Shell 0.01%

arrayfire's Introduction

ArrayFire is a general-purpose tensor library that simplifies the process of software development for the parallel architectures found in CPUs, GPUs, and other hardware acceleration devices. The library serves users in every technical computing market.

The community of ArrayFire developers invites you to build with us if you're interested and able to write top performing tensor functions. Together we can fulfill The ArrayFire Mission under an excellent Code of Conduct that promotes a respectful and friendly building experience.

Several of ArrayFire's benefits include:

  • Hundreds of accelerated tensor computing functions, in the following areas:
    • Array handling
    • Computer vision
    • Image processing
    • Linear algebra
    • Machine learning
    • Standard math
    • Signal Processing
    • Statistics
    • Vector algorithms
  • Easy to use, stable, well-documented API
  • Rigorous benchmarks and tests ensuring top performance and numerical accuracy
  • Cross platform compatibility with support for CUDA, OpenCL, and native CPU on Windows, Mac, and Linux
  • Built-in visualization functions through Forge
  • Commercially friendly open-source licensing
  • Commercial support from ArrayFire

ArrayFire provides software developers with a high-level abstraction of data that resides on the accelerator, the af::array object. Developers write code that performs operations on ArrayFire arrays which, in turn, are automatically translated into near-optimal kernels that execute on the computational device.

ArrayFire is successfully used on devices ranging from low-power mobile phones to high-power GPU-enabled supercomputers. ArrayFire runs on CPUs from all major vendors (Intel, AMD, ARM), GPUs from the prominent manufacturers (NVIDIA, AMD, and Qualcomm), as well as a variety of other accelerator devices on Windows, Mac, and Linux.

Installation

You can install the ArrayFire library in one of the following ways:

Package Managers

This approach is currently only supported for Ubuntu 18.04 and 20.04. Please go through our GitHub wiki page for the detailed instructions.

Official installers

Execute one of our official binary installers for Linux, OSX, and Windows platforms.

Build from source

Build from source by following instructions on our wiki.

Examples

The following examples are simplified versions of helloworld.cpp and conway_pretty.cpp, respectively. For more code examples, visit the examples/ directory.

Hello, world!

array A = randu(5, 3, f32); // Create 5x3 matrix of random floats on the GPU
array B = sin(A) + 1.5;     // Element-wise arithmetic
array C = fft(B);           // Fourier transform the result

float d[] = { 1, 2, 3, 4, 5, 6 };
array D(2, 3, d, afHost);   // Create 2x3 matrix from host data
D.col(0) = D.col(end);      // Copy last column onto first

array vals, inds;
sort(vals, inds, A);        // Sort A and print sorted array and corresponding indices
af_print(vals);
af_print(inds);

Conway's Game of Life

Visit the Wikipedia page for a description of Conway's Game of Life.

static const float h_kernel[] = {1, 1, 1, 1, 0, 1, 1, 1, 1};
static const array kernel(3, 3, h_kernel, afHost);

array state = (randu(128, 128, f32) > 0.5).as(f32); // Generate starting state
Window myWindow(256, 256);
while(!myWindow.close()) {
  array nHood = convolve(state, kernel); // Obtain neighbors
  array C0 = (nHood == 2);               // Generate conditions for life
  array C1 = (nHood == 3);
  state = state * C0 + C1;               // Update state
  myWindow.image(state);                 // Display
}

Conway's Game of Life

Documentation

You can find our complete documentation here.

Quick links:

Language support

ArrayFire has several official and third-party language API`s:

Native

Official wrappers

We currently support the following language wrappers for ArrayFire:

Wrappers for other languages are a work-in-progress: .NET, Fortran, Go, Java, Lua, NodeJS, R, Ruby

Third-party wrappers

The following wrappers are being maintained and supported by third parties:

Contributing

Contributions of any kind are welcome! Please refer to the wiki to learn more about how you can get involved with ArrayFire.

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 citation document.

ArrayFire development is funded by AccelerEyes LLC and several third parties, please see the list of acknowledgements for an expression of our gratitude.

Support and Contact Info

Trademark Policy

The literal mark “ArrayFire” and ArrayFire logos are trademarks of AccelerEyes LLC (dba ArrayFire). If you wish to use either of these marks in your own project, please consult ArrayFire's Trademark Policy

arrayfire's People

Contributors

pavanky avatar shehzan10 avatar 9prady9 avatar umar456 avatar syurkevi avatar bkloppenborg avatar mlloreda avatar godisemo avatar cnugteren avatar ghisvail avatar filipemaia avatar pentschev avatar williamtambellini avatar melonakos avatar glehmann avatar mark-poscablo avatar willyborn avatar r-barnes avatar floopcz avatar jacobkahn avatar schuhschuh avatar klemmster avatar keno avatar marbre avatar fzimmermann89 avatar nevion avatar kylelutz avatar shadyboukhary avatar mcclanahoochie avatar jramapuram avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.