-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayFire bindings for Linear Algebra #3
Merged
Merged
Changes from all commits
Commits
Show all changes
125 commits
Select commit
Hold shift + click to select a range
f64db84
added initialization tests
prasunanand c30155a
blas spec
prasunanand 110e3e1
add BLAS and LAPACK routines
prasunanand 1344b33
README
prasunanand daa476a
LICENSE
prasunanand 0666396
install instructions
prasunanand 8128615
blas test modified
prasunanand 58e0dc8
move blas routines to blas.cpp
prasunanand 32bbd43
move lapack routines to lapack.cpp
prasunanand 46e017c
move arith routines to arith.cpp
prasunanand a36d638
init routines for CUDA and OpenCL
prasunanand 0e7db4e
init methods for Data
prasunanand 9bd6a6c
init methods for Lapack
prasunanand 0b1a6d1
init methods for Blas
prasunanand b9c7e56
init methods for Backend
prasunanand 66173b1
init Device functions
prasunanand 026966f
init Algorithm functions
prasunanand c59de6a
init Random functions
prasunanand 73cc062
add paths to gemspec and modify gem name
prasunanand 9edf6b9
convert info method to singleton method
prasunanand d6c54cc
concentrating on opencl
prasunanand fb29b2a
cleanup: remove ndims, array, array2, dimension
prasunanand 359472d
use af_array to store array pointer
prasunanand aed9306
modify initializer function to store af_array pointer
prasunanand 084fbb7
move around files
prasunanand babc63c
arith: add elementwise operator declarations
prasunanand 388f662
arith: add elementwise operator definitions
prasunanand 173ccc3
arith: add unary operator declarations
prasunanand 0e28e9e
arith: add unary operator definitions
prasunanand 5177d90
arith: define arith methods for array class
prasunanand de148e1
blas: implement blas routines
prasunanand c006d86
cleanup
prasunanand 16fd9d0
more cleanup
prasunanand 8ac0ce7
modify lapack declarations
prasunanand 23593d3
add and load lapack functions
prasunanand ab2be5f
convert Algorithm methods to class methods
prasunanand 6c7696e
modify declarations for Algorithm methods
prasunanand a684fae
add and load lapack functions
prasunanand 69dc115
move data functions to data.c
prasunanand a35f2f4
move random functions to random.c
prasunanand 1b49497
move opencl functions to opencl.c
prasunanand 711f46c
move device functions to device.c
prasunanand 6950524
move cuda functions to cuda.c
prasunanand d941e7d
move backend functions to backend.c
prasunanand 7de7492
constant: implement Data#constant method
prasunanand c940258
constant: implement Data#constant_long and Data#constant_ulong method
prasunanand 7161297
constant: implement Data#range and Data#identity method
prasunanand afd245d
constant: implement Data#diag_create and Data#diag_extract
prasunanand b3a478f
constant: implement Data methods join, tile, reorder, shift
prasunanand a2cd98c
constant: implement Data methods flat and flip
prasunanand 31670da
constant: implement Data select methods
prasunanand e2faf88
constant: implement Data replace methods
prasunanand 9392985
constant: implement Data#lower Data#upper methods
prasunanand 5949de1
adding methods to Af_Array class: initialization
prasunanand b8bd136
modify names of Af_Array methods
prasunanand 8dbda74
Impement af_array bindings
prasunanand b643439
add bindings for Index module
prasunanand 8441733
implement to_cpu and ndims method to Af_Array
prasunanand d158eab
add retain and get_reference bindings
prasunanand b79ba12
generalize Af_Array#new to accept ndims upto 4
prasunanand c1fe2db
implement Af_Array singleton methods to crate_array and create_handle
prasunanand 98b8f8a
implemented deep array coppying
prasunanand f4bf35e
add elementwise comparision operators
prasunanand a23cd42
added equality operator
prasunanand 4be52d6
use bool array to store result in eqeq
prasunanand 73a8787
modify blas spec
prasunanand db68dc2
added rspec-its as a dependency
prasunanand 3a0bb7b
modify tests in creation_spec and reauire rspec-its
prasunanand 12ea9bc
dims and elements attributes
prasunanand e8606c9
added contributing guideline
prasunanand 5efc291
added rdoc task
prasunanand 9e56cb5
switch to minitest
prasunanand 2f30174
modify tests according to minitest
prasunanand d08b71d
run test after compile
prasunanand 170101d
added arith test
prasunanand dcf1c54
added algorithm tests
prasunanand a4b22e4
added more tests
prasunanand abba793
modify test parameters and add more tests
prasunanand 397f40d
remove unused declarations
prasunanand a246364
get rid of warnings
prasunanand 8e8ee70
minor modifications
prasunanand e9576cb
added unary method tests
prasunanand 7d0e5b3
added blas tests
prasunanand c76214a
added lapack tests
prasunanand ef6a83f
implemented lapack factorization methods
prasunanand 062b5ac
bind ArrayFire::Backend apis
prasunanand c368e68
added tests for ArrayFire::Data
prasunanand b33bf94
init ArrayFire::Statistics class
prasunanand 261bfc4
add statistics methods
prasunanand 66ec7d5
init ArrayFire::Util class
prasunanand a6d4b0b
Added tests for ArrayFire::Statistics#methods
prasunanand fe49c82
Implement Random Engine
prasunanand eb2bcd9
init multiple dtypes
prasunanand 4fc9e5a
pass matrix property as an argument to #matmul
prasunanand 266c154
add more definitions
prasunanand 5dcddf7
pass mat_properties to #matmul and #dot
prasunanand 8514495
arrays and lists for passing symbols
prasunanand f0a4d3d
add bindings for device module
prasunanand 00f68e5
ArrayFire::Backend bindings
prasunanand db253e9
added CUDA specific bindings to handle CUDA code
prasunanand 296e61e
added opencl bindings
prasunanand 7e2297e
add comments and headers for Sparse
prasunanand e080fdd
ArrayFire::Sparse class init
prasunanand f52d753
move arith functions to arith.c
prasunanand 0a42d5f
sparse array bindings
prasunanand 8a0bc75
init examples
prasunanand f9e1c6d
added factorization tests for lapack
prasunanand 0a352ec
add solve test
prasunanand 7201e8f
add Util.print_array
prasunanand 2f8d12f
added sync method
prasunanand 3db8864
use doubles as default
prasunanand fa5c7f1
added eval bindings
prasunanand d311d00
Random#methods added
prasunanand b904f0b
added util methods
prasunanand e415637
complete Sparse bindings
prasunanand 1a370f5
specify type for random engine
prasunanand e250a84
added NMatrix - ArrayFire interface
prasunanand faae5dc
device_info
prasunanand c3b143e
Util.get_version
prasunanand ae121f5
added Af_Array#to_s method
prasunanand 4bafb2d
gem version and unified backend
prasunanand 9f1f2aa
device multiple returns
prasunanand 70fd885
replace malloc and free with Ruby GC aware mallocs and xfree respecti…
prasunanand edec567
added exception handling
prasunanand 18fcd08
correct test for sinh
prasunanand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Contributing to ArrayFire | ||
|
||
## Reporting Issues | ||
|
||
We both value and encourage the community to provide feedback about using ArrayFire and the issues they are facing. | ||
The more detailed the information, the easier it is for the developers to resolve the issue. | ||
|
||
Issues can span a variety of topics including: | ||
- Feature requests | ||
- Bug reports | ||
- Build Issues | ||
- Performance improvements | ||
- New hardware / backend support | ||
|
||
We use the github [issue tracker](https://github.com/arrayfire/arrayfire-rb/issues?state=open) to track our issues. Technical issues can also be discussed on our [user forum](https://groups.google.com/forum/#!forum/arrayfire-users). | ||
|
||
## Contributing Code | ||
|
||
If you want to contribute code, we suggest you use the one of the following methods. | ||
|
||
- [Using Github](https://github.com/arrayfire/arrayfire-rb/wiki/Contribute-code-using-github) | ||
- [Using Email](https://github.com/arrayfire/arrayfire-rb/wiki/Contribute-code-using-email) | ||
|
||
Key areas of code contributions include: | ||
- [New features](https://github.com/arrayfire/arrayfire-rb/issues?q=is%3Aopen+is%3Aissue+label%3Afeature) | ||
- [Bug fixes](https://github.com/arrayfire/arrayfire-rb/labels/bug) | ||
- [Style changes](https://github.com/arrayfire/arrayfire-rb/labels/style) | ||
- [Performance improvements](https://github.com/arrayfire/arrayfire-rb/labels/style) | ||
- [New tests](https://github.com/arrayfire/arrayfire-rb/labels/test) | ||
- New examples! | ||
|
||
## ArrayFire Based Projects | ||
|
||
You can also contribute to ArrayFire by helping out projects that use ArrayFire! For our part, in addition to the ArrayFire library we are also in the process of adding native bindings for numerous language. We currently support | ||
|
||
- [Java](https://github.com/arrayfire/arrayfire_java) | ||
- [R](https://github.com/arrayfire/arrayfire_r) | ||
- [Fortran](https://github.com/arrayfire/arrayfire_fortran) | ||
|
||
If you are experienced in any of these languages, you can help us improve these language bindings. If you prefer a different language that is not in the list, dive in and create a new repo! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,45 @@ | ||
<a href="http://arrayfire.com/"><img src="http://arrayfire.com/logos/arrayfire_logo_whitebkgnd.png" width="300"></a> | ||
|
||
ArrayFire is a general-purpose library that simplifies the process of developing | ||
software that targets parallel and massively-parallel architectures including | ||
CPUs, GPUs, and other hardware acceleration devices. | ||
|
||
# Ruby wrapper for ArrayFire | ||
|
||
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/arrayfire/arrayfire-ruby) | ||
|
||
Ruby bindings are a work in progress and are not production ready yet. | ||
|
||
## Build from source | ||
## Installation | ||
|
||
```sh | ||
git clone https://github.com/arrayfire/arrayfire-rb | ||
cd arrayfire/ | ||
gem install bundler | ||
bundle install | ||
rake compile | ||
``` | ||
|
||
Run the tests using | ||
|
||
```sh | ||
rake test | ||
``` | ||
|
||
If you want to try out the code without installing: | ||
|
||
```sh | ||
rake pry | ||
``` | ||
|
||
To install: | ||
|
||
```sh | ||
rake install | ||
``` | ||
|
||
# LICENSE | ||
|
||
This software is distributed under the [BSD 3-Clause License](LICENSE). | ||
|
||
Copyright © 2017, Prasun Anand and ArrayFire |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
# coding: utf-8 | ||
$:.unshift File.expand_path("../lib", __FILE__) | ||
|
||
require 'arrayfire/version.rb' | ||
|
||
ArrayFire::DESCRIPTION = <<MSG | ||
ArrayFire is a general-purpose library that simplifies the process of developing | ||
software that targets parallel and massively-parallel architectures including | ||
CPUs, GPUs, and other hardware acceleration devices. | ||
MSG | ||
|
||
Gem::Specification.new do |gem| | ||
gem.name = 'ArrayFire' | ||
gem.version = '0.0.0' | ||
gem.name = 'arrayfire' | ||
gem.version = ArrayFire::VERSION | ||
gem.date = '2016-09-29' | ||
gem.summary = 'Ruby wrapper for ArrayFire.' | ||
gem.description = 'Ruby wrapper for ArrayFire.' | ||
gem.description = ArrayFire::DESCRIPTION | ||
gem.authors = ['Prasun Anand'] | ||
gem.email = '[email protected]' | ||
gem.files = ['lib/arrayfire.rb'] | ||
gem.homepage = 'http://rubygems.org/gems/arrayfire' | ||
gem.license = 'BSD-3-Clause' | ||
gem.add_development_dependency 'rubocop' | ||
gem.extensions = ['ext/mri/extconf.rb'] | ||
gem.files = `git ls-files -- ext/mri`.split("\n") | ||
gem.files += `git ls-files -- lib`.split("\n") | ||
gem.require_paths = ["lib"] | ||
gem.add_development_dependency 'rubocop', '~> 0' | ||
gem.add_development_dependency 'bundler', '~>1.6' | ||
gem.add_development_dependency 'json' | ||
gem.add_development_dependency 'json', '~> 0' | ||
gem.add_development_dependency 'pry', '~>0.10' | ||
gem.add_development_dependency 'rake', '~>10.3' | ||
gem.add_development_dependency 'rake-compiler', '~>0.8' | ||
gem.add_development_dependency 'rdoc', '~>4.0', '>=4.0.1' | ||
gem.add_development_dependency 'rspec', '~>2.14' | ||
end | ||
gem.add_development_dependency "minitest", "~> 5.0" | ||
|
||
gem.add_development_dependency 'nmatrix', '~> 0.2.1' | ||
end |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this task run if you do a
gem build
on the gemspec? Is it not possible to add this to the gemspec itself?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@v0dro I didn't get the question. Why would we need
rdoc
to run when usinggem build
.?AFAIK, RubyDoc.info automatically generates the docs when I push the gem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the above rake commands adds rdoc files which are then read by rubygems.org to generate YARD docs. If its not done during gem build and if you forget to run above rake task, the rdoc files will not get added to the gemspec and rubygems wont be able to detect them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@v0dro, I will follow Victor's advice about using
rubygems-tasks
library.