Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python bindings for ArrayFire: A general purpose GPU library.

License

NotificationsYou must be signed in to change notification settings

arrayfire/arrayfire-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Status

OSTests
LinuxBuild Status
WindowsBuild Status
OSXBuild Status
Linux on ARMBuild Status

Documentation

Documentation for this project can be foundover here.

Example

# Monte Carlo estimation of pidefcalc_pi_device(samples):# Simple, array based API# Generate uniformly distributed random numersx=af.randu(samples)y=af.randu(samples)# Supports Just In Time Compilation# The following line generates a single kernelwithin_unit_circle= (x*x+y*y)<1# Intuitive function namesreturn4*af.count(within_unit_circle)/samples

Choosing a particular backend can be done usingaf.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-pythonpython setup.py install

Post Installation

Please followthese 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

Acknowledgements

The ArrayFire library is written by developers atArrayFire LLCwithcontributions from several individuals.

The developers at ArrayFire LLC have received partial financial supportfrom several grants and institutions. Those that wish to receive publicacknowledgement are listed below:

Grants

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

About

Python bindings for ArrayFire: A general purpose GPU library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors27


[8]ページ先頭

©2009-2025 Movatter.jp