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

Lua wrapper for ArrayFire

License

NotificationsYou must be signed in to change notification settings

arrayfire/arrayfire-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 Lua bindings for the ArrayFire library.

The wrapper is currently compliant with ArrayFire 3.2 API (and higher). If you find any bugs, please report themhere.

Example

localAF=require("arrayfire")AF.main(function()localx=AF.randu(5,"f32")AF.print("x",x)AF.print("min of x",AF.min(x))AF.print("max of x",AF.max(x))end)
$ lua examples/lua/helloworld/intro.luaArrayFire v3.2.1 (CUDA, 64-bit Linux, build f263db0)Platform: CUDA Toolkit 7.5, Driver: 358.16[0] GeForce GTX 690, 2047 MB, CUDA Compute 3.0-1- GeForce GTX 690, 2048 MB, CUDA Compute 3.0x[5 1 1 1]0.74020.92100.03900.96900.9251min of x[1 1 1 1]0.0390max of x[1 1 1 1]0.9690

Documentation

TODO

Getting Started

Requirements

  • cmake
  • Visual Studio on Windows,clang /gcc on Linux / OSX.

Get ArrayFire libraries

You can install ArrayFire using one of the following two ways.

Post Installation Instructions

  • Please readthe wiki page for setting up the proper environment variables.

Building the Lua module

Windows

  1. Launchcmake-gui. Set source and build directories.
  2. Press configure.
  3. Selectgenerator asVisual Studio 12 2013 Win64.
    • You can choose a different generator as long as it is Win64.
  4. SetCMAKE_INSTALL_PREFIX to a location of choice.
  5. Press generate. The generated visual studio solution file will be present in the build directory.
  6. Open the VS solution file and build theINSTALL project.

Linux / OSX

  1. Make sure the environment variableArrayFire_DIR is set to/path/to/arrayfire/share/ArrayFire/cmake.
  2. Create a build directory andcd into it.
  3. Runcmake /path/to/arrayfire-lua/ -DCMAKE_INSTALL_PREFIX=package.
  4. Runmake

Setting up Lua paths

Windows

> SET LUA_PATH=C:\path\to\install\location\arrayfire\?.lua;;> SET LUA_CPATH=C:\path\to\install\location\?.dll;;> lua.exe helloworld/helloworld.lua

Linux

$ export LUA_PATH="/path/to/install/location/arrayfire/?.lua;;"$ export LUA_CPATH="/path/to/install/location/?.so;;"$ lua helloworld/helloworld.lua

You should now be good to go!

Issues

This is a work in progress and is not intended for production use.

Acknowledgements

This project began with significant contributions fromSteven Johnson. It is currently being maintained by@arrayfire/lua-devel team.

About

Lua wrapper for ArrayFire

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp