File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
using BenchmarkTools
2
2
using LinearAlgebra, RecursiveFactorization
3
3
4
- BenchmarkTools. DEFAULT_PARAMETERS. seconds = 0.08
4
+ BenchmarkTools. DEFAULT_PARAMETERS. seconds = 0.5
5
5
6
6
function luflop (m, n= m; innerflop= 2 )
7
7
sum (1 : min (m, n)) do k
@@ -22,14 +22,14 @@ ref_mflops = Float64[]
22
22
ns = 4 : 8 : 500
23
23
for n in ns
24
24
@info " $n × $n "
25
- A = rand (n, n)
26
- bt = @belapsed LinearAlgebra. lu! ($ ( copy (A) ))
25
+ global A = rand (n, n)
26
+ bt = @belapsed LinearAlgebra. lu! (B) setup = (B = copy (A))
27
27
push! (bas_mflops, luflop (n)/ bt/ 1e9 )
28
28
29
- rt = @belapsed RecursiveFactorization. lu! ($ ( copy (A) ))
29
+ rt = @belapsed RecursiveFactorization. lu! (B) setup = (B = copy (A))
30
30
push! (rec_mflops, luflop (n)/ rt/ 1e9 )
31
31
32
- ref = @belapsed LinearAlgebra. generic_lufact! ($ ( copy (A) ))
32
+ ref = @belapsed LinearAlgebra. generic_lufact! (B) setup = (B = copy (A))
33
33
push! (ref_mflops, luflop (n)/ ref/ 1e9 )
34
34
end
35
35
You can’t perform that action at this time.
0 commit comments