Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Dec 22, 2023

After this,

julia> using FillArrays, StaticArrays, LinearAlgebra

julia> A = [SMatrix{2,3}(1:6)*(i+j) for i in 1:3, j in 1:2]
3×2 Matrix{SMatrix{2, 3, Int64, 6}}:
 [2 6 10; 4 8 12]    [3 9 15; 6 12 18]
 [3 9 15; 6 12 18]   [4 12 20; 8 16 24]
 [4 12 20; 8 16 24]  [5 15 25; 10 20 30]

julia> B = OneElement(SMatrix{3,2}(1:6), (2,2), (2,4))
2×4 OneElement{SMatrix{3, 2, Int64, 6}, 2, Tuple{Int64, Int64}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}:
                                                               
                 [1 4; 2 5; 3 6]                                

julia> C = [SMatrix{2,2}(1:4) for i in 1:size(A,1), j in 1:4]
3×4 Matrix{SMatrix{2, 2, Int64, 4}}:
 [1 3; 2 4]  [1 3; 2 4]  [1 3; 2 4]  [1 3; 2 4]
 [1 3; 2 4]  [1 3; 2 4]  [1 3; 2 4]  [1 3; 2 4]
 [1 3; 2 4]  [1 3; 2 4]  [1 3; 2 4]  [1 3; 2 4]

julia> mul!(copy(C), A, B, 1, 2) == A * B + 2C
true

@jishnub jishnub added the bugfix label Dec 22, 2023
@codecov
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (99278fa) 99.90% compared to head (0d76191) 99.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
- Coverage   99.90%   99.90%   -0.01%     
==========================================
  Files           8        8              
  Lines        1037     1034       -3     
==========================================
- Hits         1036     1033       -3     
  Misses          1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jishnub jishnub force-pushed the jishnub/oneelmulnoncommutative branch from b13da77 to 0d76191 Compare February 3, 2024 05:45
@jishnub jishnub requested a review from dlfivefifty April 22, 2024 13:22
@jishnub
Copy link
Member Author

jishnub commented Apr 25, 2024

Gentle bump. The main change here is to use Ref around the elements to treat them as scalars in broadcasting

@jishnub jishnub merged commit 8734371 into master Apr 25, 2024
@jishnub jishnub deleted the jishnub/oneelmulnoncommutative branch April 25, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants