Skip to content

Commit e773c79

Browse files
committed
Benchmarks eWiseAdd with AtLeastOne
1 parent 6cab3e6 commit e773c79

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksEWiseAdd.fs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,53 @@ type EWiseAddBenchmarks4BoolCSRWithoutDataTransfer() =
334334

335335
static member InputMatricesProvider =
336336
EWiseAddBenchmarks<_, _>.InputMatricesProviderBuilder "EWiseAddBenchmarks4BoolCSR.txt"
337+
338+
// With AtLeastOne
339+
340+
type EWiseAddAtLeastOneBenchmarks4BoolCOOWithoutDataTransfer() =
341+
342+
inherit EWiseAddBenchmarksWithoutDataTransfer<Backend.COOMatrix<bool>,bool>(
343+
(fun context wgSize -> Backend.COOMatrix.eWiseAdd2 context Backend.Common.StandardOperations.boolSum2 wgSize),
344+
(fun _ -> true),
345+
(fun _ -> true),
346+
M.buildCooMatrix
347+
)
348+
349+
static member InputMatricesProvider =
350+
EWiseAddBenchmarks<_, _>.InputMatricesProviderBuilder "EWiseAddBenchmarks4BoolCSR.txt"
351+
352+
type EWiseAddAtLeastOneBenchmarks4BoolCSRWithoutDataTransfer() =
353+
354+
inherit EWiseAddBenchmarksWithoutDataTransfer<Backend.CSRMatrix<bool>,bool>(
355+
(fun context wgSize -> Backend.CSRMatrix.eWiseAdd2 context Backend.Common.StandardOperations.boolSum2 wgSize),
356+
(fun _ -> true),
357+
(fun _ -> true),
358+
M.buildCsrMatrix
359+
)
360+
361+
static member InputMatricesProvider =
362+
EWiseAddBenchmarks<_, _>.InputMatricesProviderBuilder "EWiseAddBenchmarks4BoolCSR.txt"
363+
364+
type EWiseAddAtLeastOneBenchmarks4Float32COOWithoutDataTransfer() =
365+
366+
inherit EWiseAddBenchmarksWithoutDataTransfer<Backend.COOMatrix<float32>,float32>(
367+
(fun context wgSize -> Backend.COOMatrix.eWiseAdd2 context Backend.Common.StandardOperations.float32Sum2 wgSize),
368+
float32,
369+
(fun _ -> Utils.nextSingle (System.Random())),
370+
M.buildCooMatrix
371+
)
372+
373+
static member InputMatricesProvider =
374+
EWiseAddBenchmarks<_,_>.InputMatricesProviderBuilder "EWiseAddBenchmarks4Float32COO.txt"
375+
376+
type EWiseAddAtLeastOneBenchmarks4Float32CSRWithoutDataTransfer() =
377+
378+
inherit EWiseAddBenchmarksWithoutDataTransfer<Backend.CSRMatrix<float32>,float32>(
379+
(fun context wgSize -> Backend.CSRMatrix.eWiseAdd2 context Backend.Common.StandardOperations.float32Sum2 wgSize),
380+
float32,
381+
(fun _ -> Utils.nextSingle (System.Random())),
382+
M.buildCsrMatrix
383+
)
384+
385+
static member InputMatricesProvider =
386+
EWiseAddBenchmarks<_,_>.InputMatricesProviderBuilder "EWiseAddBenchmarks4Float32COO.txt"

0 commit comments

Comments
 (0)