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

Add tests to increase code coverage #10

Closed DilumAluthge closed 3 years ago

DilumAluthge commented 3 years ago

Fixes #9

codecov[bot] commented 3 years ago

Codecov Report

Merging #10 (88815d0) into master (72b511a) will increase coverage by 21.21%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #10       +/-   ##
===========================================
+ Coverage   77.87%   99.09%   +21.21%     
===========================================
  Files           7        9        +2     
  Lines         113      110        -3     
===========================================
+ Hits           88      109       +21     
+ Misses         25        1       -24     
Impacted Files Coverage Δ
src/Octavian.jl 100.00% <ø> (ø)
src/macrokernels.jl 90.90% <ø> (ø)
src/types.jl 100.00% <ø> (+55.55%) :arrow_up:
src/block_sizes.jl 100.00% <100.00%> (+6.25%) :arrow_up:
src/memory_buffer.jl 100.00% <100.00%> (ø)
src/pointer_matrix.jl 100.00% <100.00%> (ø)
src/utils.jl 100.00% <100.00%> (+28.57%) :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 72b511a...88815d0. Read the comment docs.

DilumAluthge commented 3 years ago

@chriselrod In particular, can you take a look at my refactoring of src/block_sizes.jl, and make sure that everything is still correct there?

DilumAluthge commented 3 years ago

@chriselrod Take a look now, I think everything is fixed.

This is what I get:

julia> @code_typed Octavian.block_sizes(Float64)
CodeInfo(
1 ─     nothing::Nothing
│       nothing::Nothing
└──     goto #3 if not false
2 ─     nothing::Nothing
3 ┄     return (Static(72), Static(284), Static(984))
) => Tuple{ArrayInterface.StaticInt{72}, ArrayInterface.StaticInt{284}, ArrayInterface.StaticInt{984}}

julia> @code_typed Octavian.block_sizes(Float32)
CodeInfo(
1 ─     nothing::Nothing
│       nothing::Nothing
└──     goto #3 if not false
2 ─     nothing::Nothing
3 ┄     return (Static(144), Static(284), Static(1974))
) => Tuple{ArrayInterface.StaticInt{144}, ArrayInterface.StaticInt{284}, ArrayInterface.StaticInt{1974}}

julia> @code_typed Octavian.block_sizes(Int64)
CodeInfo(
1 ─     nothing::Nothing
│       nothing::Nothing
└──     goto #3 if not false
2 ─     nothing::Nothing
3 ┄     return (Static(72), Static(284), Static(984))
) => Tuple{ArrayInterface.StaticInt{72}, ArrayInterface.StaticInt{284}, ArrayInterface.StaticInt{984}}

julia> @code_typed Octavian.block_sizes(Int32)
CodeInfo(
1 ─     nothing::Nothing
│       nothing::Nothing
└──     goto #3 if not false
2 ─     nothing::Nothing
3 ┄     return (Static(144), Static(284), Static(1974))
) => Tuple{ArrayInterface.StaticInt{144}, ArrayInterface.StaticInt{284}, ArrayInterface.StaticInt{1974}}
DilumAluthge commented 3 years ago

@chriselrod I think this is good to go, so I'm merging. When you get a chance, can you double-check that the typed code looks correct?