Skip to content

Commit 45e4536

Browse files
committed
refactor: Matrix.AtLeastOne
1 parent 1e3b53c commit 45e4536

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ module Matrix =
305305
let CSRMap2 =
306306
CSR.Matrix.map2AtLeastOne clContext opAdd workGroupSize
307307

308+
let COOTranspose =
309+
COO.Matrix.transposeInPlace clContext workGroupSize
310+
308311
fun (processor: MailboxProcessor<_>) allocationMode matrix1 matrix2 ->
309312
match matrix1, matrix2 with
310313
| ClMatrix.COO m1, ClMatrix.COO m2 ->
@@ -315,6 +318,7 @@ module Matrix =
315318
|> ClMatrix.COO
316319
| ClMatrix.CSC m1, ClMatrix.CSC m2 ->
317320
(CSRMap2 processor allocationMode m1.ToCSR m2.ToCSR)
321+
|> COOTranspose processor
318322
|> ClMatrix.COO
319323
| _ -> failwith "Matrix formats are not matching"
320324

0 commit comments

Comments
 (0)