Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bramtayl committed Mar 6, 2018
1 parent 4584ed9 commit 876c5e9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 44 deletions.
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# JuliennedArrays

[![travis badge][travis_badge]][travis_url]
[![appveyor badge][appveyor_badge]][appveyor_url]
[![codecov badge][codecov_badge]][codecov_url]

## Documentation [here][documenter_latest]

[travis_badge]: https://travis-ci.org/bramtayl/JuliennedArrays.jl.svg?branch=master
[travis_url]: https://travis-ci.org/bramtayl/JuliennedArrays.jl

[appveyor_badge]: https://ci.appveyor.com/api/projects/status/github/bramtayl/JuliennedArrays.jl?svg=true&branch=master
[appveyor_url]: https://ci.appveyor.com/project/bramtayl/juliennedarrays-jl

[codecov_badge]: http://codecov.io/github/bramtayl/JuliennedArrays.jl/coverage.svg?branch=master
[codecov_url]: http://codecov.io/github/bramtayl/JuliennedArrays.jl?branch=master

[documenter_stable]: https://bramtayl.github.io/JuliennedArrays.jl/stable
[documenter_latest]: https://bramtayl.github.io/JuliennedArrays.jl/latest
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bramtayl.github.io/JuliennedArrays.jl/stable)
[![Latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://bramtayl.github.io/JuliennedArrays.jl/latest)
[![Build Status](https://travis-ci.org/bramtayl/JuliennedArrays.jl.svg?branch=master)](https://travis-ci.org/bramtayl/JuliennedArrays.jl)
[![CodeCov](https://codecov.io/gh/bramtayl/JuliennedArrays.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/bramtayl/JuliennedArrays.jl)
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

19 changes: 18 additions & 1 deletion src/JuliennedArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ getindex(j::JulienneIndexer{T, N}, index::Vararg{Int, N}) where {T, N} =

JulienneIndexer(indexes, indexed) =
JulienneIndexer{
typeof(ifelse.(indexed, 1, indexes)),
typeof(map(indexed, indexes) do switch, index
ifelse(switch, 1, index)
end),
length(getindex_unrolled(indexes, indexed)),
typeof(indexes),
typeof(indexed)
Expand Down Expand Up @@ -148,6 +150,21 @@ julia> @inferred map(Reduction(+), julienne(array, (*, :)))
15
6
24
julia> array = reshape(1:8, 2, 2, 2)
2×2×2 Base.ReshapedArray{Int64,3,UnitRange{Int64},Tuple{}}:
[:, :, 1] =
1 3
2 4
[:, :, 2] =
5 7
6 8
julia> @inferred map(Reduction(+), julienne(array, (:, *, :)))
1×2×1 Array{Int64,3}:
[:, :, 1] =
14 22
```
"""
struct Reduction{F} <: FunctionOptimization{F}; f::F; end
Expand Down

0 comments on commit 876c5e9

Please sign in to comment.