JuliaSIMD / JuliaSIMD/StrideArraysCore.jl

Dot of views is broken

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
19
Forks
10
PR merge metrics
No merged PRs in 30d

Description

The following behavior is incorrect:

```julia
julia> using StrideArraysCore, Random, LinearAlgebra

julia> function test()
Random.seed!(1234)

A = randn(10, 10, 4)
B = randn(10, 10, 4)

A_sa = StrideArray(A, static.(size(A)))
B_sa = StrideArray(B, static.(size(B)))

A = view(A, 2:9, 2:9, :)
B = view(B, 2:9, 2:9, :)

A_sa = view(A_sa, 2:9, 2:9, :)
B_sa = view(B_sa, 2:9, 2:9, :)

return dot(A, B), dot(A_sa, B_sa)
end;

julia> test()
(-18.285580500544746, -37.80416770991308)
```
This should output the same numbers.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.