File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
src/GraphBLAS-sharp.Backend Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ module Radix =
318318 keysPair <- swap keysPair
319319 valuesPair <- swap valuesPair
320320
321+ globalOffset.Free processor
321322 localOffset.Free processor
322323 shift.Free processor
323324
Original file line number Diff line number Diff line change @@ -568,6 +568,10 @@ module Reduce =
568568 .ToHostAndFree processor
569569
570570 if resultLength = 0 then
571+ reducedValues.Free processor
572+ reducedKeys.Free processor
573+ resultPositions.Free processor
574+
571575 None
572576 else
573577 // write values
@@ -848,6 +852,11 @@ module Reduce =
848852 .ToHostAndFree processor
849853
850854 if resultLength = 0 then
855+ reducedValues.Free processor
856+ firstReducedKeys.Free processor
857+ secondReducedKeys.Free processor
858+ resultPositions.Free processor
859+
851860 None
852861 else
853862 // write value
Original file line number Diff line number Diff line change @@ -399,6 +399,10 @@ module Expand =
399399
400400 // compute sub result
401401 let length , result = runCOO subMatrix
402+
403+ // release subMatrix (TODO(non blocking Free)
404+ subMatrix.Dispose processor
405+
402406 // increase workOffset according to previous expand
403407 let workOffset = workOffset + length
404408
@@ -445,7 +449,12 @@ module Expand =
445449 if generalLength < maxAllocSize then
446450 segmentLengths.Free processor
447451
448- runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix
452+ let result =
453+ runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix
454+
455+ rightMatrixRowsNNZ.Free processor
456+
457+ result
449458 else
450459 let result =
451460 runManySteps
You can’t perform that action at this time.
0 commit comments