@@ -47,6 +47,7 @@ function mxm(A::SparseMatrixCSC, B)
4747 printstyled (stdout , " \n C = A::SparseMatrixCSC($(size (A)) ) * B::$(typeof (B)) ($(size (B)) )\n " )
4848 result = @bench A * B
4949 println (stdout , result, " s" )
50+ GC. gc ()
5051 flush (stdout )
5152 return result
5253end
@@ -65,10 +66,34 @@ function mxm(A::SuiteSparseGraphBLAS.GBArray, B::SuiteSparseGraphBLAS.GBArray; a
6566 result = @gbbench mul! (C, A, B; accum= + )
6667 end
6768 println (stdout , result, " s" )
69+ GC. gc ()
70+ flush (stdout )
71+ return result
72+ end
73+
74+ function tpose (A:: SuiteSparseGraphBLAS.GBArray )
75+ Ao = storageorder (A) == ColMajor () ? " C" : " R"
76+ Bo = storageorder (B) == ColMajor () ? " C" : " R"
77+ printstyled (stdout , " \n C::GBArray = transpose(A::GBArray($Ao , $(size (A)) ))\n " )
78+ result = @gbbench copy (transpose (A))
79+ println (stdout , result, " s" )
80+ GC. gc ()
6881 flush (stdout )
6982 return result
7083end
7184
85+ function tpose (A:: SparseMatrixCSC )
86+ printstyled (stdout , " \n C = transpose(A::SparseMatrixCSC($(size (A)) ))\n " )
87+ result = @bench copy (transpose (A))
88+ println (stdout , result, " s" )
89+ GC. gc ()
90+ flush (stdout )
91+ return result
92+ end
93+
94+ function spdbench (A)
95+ end
96+
7297function singlebench (pathornum)
7398 x = tryparse (Int64, pathornum)
7499 if x != = nothing
@@ -160,6 +185,26 @@ function singlebench(pathornum)
160185 println (stdout , " A by col (1, 2, 16 thread): $gbresultsC " )
161186 println (stdout , " SparseArrays: $SAresults " )
162187 flush (stdout )
188+
189+ printstyled (stdout , " \n Sparse * Sparse'" ; bold= true )
190+ println (stdout , " ################################" )
191+ flush (stdout )
192+ gbset (A, :format , SuiteSparseGraphBLAS. BYROW)
193+ diag (A)
194+ gbresultsR = runthreaded (A, transpose (A))
195+ gbset (A, :format , SuiteSparseGraphBLAS. BYCOL)
196+ diag (A)
197+ gbresultsC = runthreaded (A, transpose (A))
198+ A2 = SparseMatrixCSC (A)
199+ SAresults = mxm (A2, transpose (A2))
200+ println (stdout , )
201+ printstyled (stdout , " \n RESULTS, Sparse * Sparse: \n " ; bold= true , color= :green )
202+ println (stdout , " ################################" )
203+ println (stdout , " A by row (1, 2, 16 thread): $gbresultsR " )
204+ println (stdout , " A by col (1, 2, 16 thread): $gbresultsC " )
205+ println (stdout , " SparseArrays: $SAresults " )
206+ flush (stdout )
207+
163208 return nothing
164209end
165210
0 commit comments