JuliaArrays / ElasticArrays.jl

Resizeable multi-dimensional arrays for Julia
Other
64 stars 11 forks source link

Add underlying array type to enable GPU use. #16

Closed aterenin closed 4 years ago

aterenin commented 4 years ago

This PR adds the type of the underlying vector to the ElasticArray struct. This enables one to use a non-Vector type, for instance a CuArray, with the package. It also adds a constructor so that Flux.@functor works with ElasticArrays out-of-the-box. The arrays appear to work on GPU just fine, albeit with scalar getindex, which is slow but nonetheless functional.

codecov-io commented 4 years ago

Codecov Report

Merging #16 into master will decrease coverage by 1.78%. The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
- Coverage     100%   98.21%   -1.79%     
==========================================
  Files           3        3              
  Lines          54       56       +2     
==========================================
+ Hits           54       55       +1     
- Misses          0        1       +1
Impacted Files Coverage Δ
src/elasticarray.jl 98.11% <80%> (-1.89%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 81a4471...1c23e16. Read the comment docs.

oschulz commented 4 years ago

Nice, thanks!

oschulz commented 4 years ago

Will make a new release with this, but need to migrate CI from travis-ci.org to travis-ci.com first (in progress).