Skip to content

Dot of views is broken #26

Description

@cafaxo

The following behavior is incorrect:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions