JuliaLinearAlgebra / Octavian.jl

Multi-threaded BLAS-like library that provides pure Julia matrix multiplication
https://julialinearalgebra.github.io/Octavian.jl/stable/
Other
232 stars 18 forks source link

fix zero shaped matmul #75

Closed GiggleLiu closed 3 years ago

GiggleLiu commented 3 years ago

Before this patch, a zero shaped matmul will crash julia.

A possible using case of zero-shaped matmul is the block diagonal matrices/tensors that used in physics simulation. During compression, one can easily generate a zero-shaped array.

codecov[bot] commented 3 years ago

Codecov Report

Merging #75 (c5b05f8) into master (cedfff2) will increase coverage by 1.89%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   83.56%   85.46%   +1.89%     
==========================================
  Files          11       11              
  Lines         566      578      +12     
==========================================
+ Hits          473      494      +21     
+ Misses         93       84       -9     
Impacted Files Coverage Δ
src/matmul.jl 89.43% <100.00%> (+4.05%) :arrow_up:
src/block_sizes.jl 94.91% <0.00%> (-1.70%) :arrow_down:
src/utils.jl 90.62% <0.00%> (+3.12%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cedfff2...c5b05f8. Read the comment docs.

chriselrod commented 3 years ago

Yeah, seems worth having the check here. Thanks for the PR!