Git Product home page Git Product logo

arrayfire-python's Introduction

ArrayFire Python Bindings

ArrayFire is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific computing code that is portable across CUDA, OpenCL and CPU devices. This project provides Python bindings for the ArrayFire library.

Documentation

Documentation for this project can be found over here.

Example

# Monte Carlo estimation of pi
def calc_pi_device(samples):
    # Simple, array based API
    # Generate uniformly distributed random numers
    x = af.randu(samples)
    y = af.randu(samples)
    # Supports Just In Time Compilation
    # The following line generates a single kernel
    within_unit_circle = (x * x + y * y) < 1
    # Intuitive function names
    return 4 * af.count(within_unit_circle) / samples

Choosing a particular backend can be done using af.set_backend(name) where name is either "cuda", "opencl", or "cpu". The default device is chosen in the same order of preference.

Requirements

Currently, this project is tested only on Linux and OSX. You also need to have the ArrayFire C/C++ library installed on your machine. You can get it from the following sources.

Please check the following links for dependencies.

Getting started

Install the last stable version:

pip install arrayfire

Install the development version:

pip install git+git://github.com/arrayfire/arrayfire-python.git@devel

Installing offline

cd path/to/arrayfire-python
python setup.py install

Post Installation

Please follow these instructions to ensure the arrayfire-python can find the arrayfire libraries.

To run arrayfire tests, you can run the following command from command line.

python -m arrayfire.tests

Communication

Acknowledgements

The ArrayFire library is written by developers at ArrayFire LLC with contributions from several individuals.

The developers at ArrayFire LLC have received partial financial support from several grants and institutions. Those that wish to receive public acknowledgement are listed below:

Grants

This material is based upon work supported by the DARPA SBIR Program Office under Contract Numbers W31P4Q-14-C-0012 and W31P4Q-15-C-0008. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the DARPA SBIR Program Office.

arrayfire-python's People

Contributors

9prady9 avatar aha66 avatar ajflood avatar andersk avatar bergkoet avatar dela3499 avatar filipemaia avatar ghisvail avatar jcmgray avatar matkraj avatar michaelnowotny avatar mlloreda avatar mrkwjc avatar pavanky avatar shehzan10 avatar shyams2 avatar syurkevi avatar tomerdmnt avatar umar456 avatar unbornchikken avatar zacdiggum avatar

Stargazers

 avatar

Watchers

 avatar  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.