Skip to content

Commit 832c2d3

Browse files
committed
peakflops: make eltype a static parameter of the method
Otherwise `eltype` is inferred as merely `DataType`. Too bad that constprop doesn't fix this on its own. This should make the sysimage more resistant to invalidation (checking rn).
1 parent 16dedb5 commit 832c2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LinearAlgebra.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ of the problem that is solved on each processor.
750750
This function requires at least Julia 1.1. In Julia 1.0 it is available from
751751
the standard library `InteractiveUtils`.
752752
"""
753-
function peakflops(n::Integer=4096; eltype::DataType=Float64, ntrials::Integer=3, parallel::Bool=false)
753+
function peakflops(n::Integer=4096; ::Type{eltype} = Float64, ntrials::Integer=3, parallel::Bool=false) where {eltype}
754754
t = zeros(Float64, ntrials)
755755
for i=1:ntrials
756756
a = ones(eltype,n,n)

0 commit comments

Comments
 (0)