Skip to content

Commit 35af95a

Browse files
committed
Merge branch 'kirillgarbar-net5' into net5
2 parents c59496a + 8aba5f9 commit 35af95a

3 files changed

Lines changed: 190 additions & 155 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,6 @@ module COOMatrix =
412412

413413
let expandSparseNnzPerRow = ClArray.setPositions clContext
414414

415-
let rowPointersAndTotalSum =
416-
ClArray.prefixSumExclude clContext workGroupSize
417-
418415
fun (processor: MailboxProcessor<_>) (rowIndices: ClArray<int>) ->
419416

420417
let nnz = rowIndices.Length
@@ -427,7 +424,10 @@ module COOMatrix =
427424
let positions, totalSum = posAndTotalSum processor bitmap
428425

429426
let hostTotalSum = [| 0 |]
430-
processor.Post(Msg.CreateToHostMsg(totalSum, hostTotalSum))
427+
428+
let _ =
429+
processor.PostAndReply(fun ch -> Msg.CreateToHostMsg(totalSum, hostTotalSum, ch))
430+
431431
let totalSum = hostTotalSum.[0]
432432

433433
let ndRangeCNPRS =
@@ -465,7 +465,7 @@ module COOMatrix =
465465
expandSparseNnzPerRow processor workGroupSize nnzPerRowSparse nonZeroRowsIndices totalSum
466466

467467
let rowPointers, _ =
468-
rowPointersAndTotalSum processor expandedNnzPerRow
468+
posAndTotalSum processor expandedNnzPerRow
469469

470470
rowPointers
471471

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module CSRMatrix =
6161

6262
let toCSR = COOMatrix.toCSR clContext workGroupSize
6363

64-
fun (processor: MailboxProcessor<_>) workGroupSize (m1: CSRMatrix<'a>) (m2: CSRMatrix<'a>) ->
64+
fun (processor: MailboxProcessor<_>) (m1: CSRMatrix<'a>) (m2: CSRMatrix<'a>) ->
6565

6666
let m1COO = toCOO processor workGroupSize m1
6767
let m2COO = toCOO processor workGroupSize m2

0 commit comments

Comments
 (0)