Skip to content

Commit

Permalink
fix abstractrarray inner fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Nov 4, 2024
1 parent f330c43 commit e3d638f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
matrix:
version:
- '1.6'
- 'lts'
- '1'
- 'nightly'
os:
Expand All @@ -34,7 +35,7 @@ jobs:
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "VectorInterface"
uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
authors = ["Jutho Haegeman <[email protected]> and contributors"]
version = "0.4.6"
version = "0.4.7"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
7 changes: 2 additions & 5 deletions src/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ function inner(x::AbstractArray, y::AbstractArray)
ay = axes(y)
ax == ay || throw(DimensionMismatch("Non-matching axes $ax and $ay"))
T = promote_inner(x, y)
s::T = zero(T)
for I in eachindex(x)
s += inner(x[I], y[I])
end
return s
return mapreduce(inner, +, x, y; init=zero(T))
# this version is friendlier to GPU arrays with mixed element types
end

2 comments on commit e3d638f

@Jutho
Copy link
Owner Author

@Jutho Jutho commented on e3d638f Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/118692

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.7 -m "<description of version>" e3d638f5ad6bdfd692e2799df297ea269c01947e
git push origin v0.4.7

Please sign in to comment.