File tree Expand file tree Collapse file tree
src/GraphBLAS-sharp.Backend/Matrix/SpGeMM Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions
1010open GraphBLAS.FSharp .Backend .Objects
1111open GraphBLAS.FSharp .Backend .Objects .ClCell
1212open FSharp.Quotations
13- open GraphBLAS.FSharp .Backend .Vector .Sparse
1413open GraphBLAS.FSharp .Backend .Objects .ClVector
1514open GraphBLAS.FSharp .Backend .Objects .ClMatrix
1615
@@ -145,6 +144,8 @@ module Expand =
145144 .ToHostAndFree( processor)
146145
147146 if resultLength = 0 then
147+ positions.Free processor
148+
148149 None
149150 else
150151 let resultIndices =
@@ -157,6 +158,8 @@ module Expand =
157158
158159 assignValues processor firstValues secondValues positions resultValues
159160
161+ positions.Free processor
162+
160163 Some( resultValues, resultIndices)
161164
162165 let sortByColumns ( clContext : ClContext ) workGroupSize =
@@ -268,13 +271,12 @@ module Expand =
268271
269272 // create sparse vector (TODO(empty vector))
270273 reduceResult
271- |> Option.bind
274+ |> Option.map
272275 ( fun ( values , columns ) ->
273276 { Context = clContext
274277 Indices = columns
275278 Values = values
276- Size = rightMatrix.ColumnCount }
277- |> Some)))
279+ Size = rightMatrix.ColumnCount })))
278280
279281 let run < 'a , 'b , 'c when 'a : struct and 'b : struct and 'c : struct >
280282 ( clContext : ClContext )
You can’t perform that action at this time.
0 commit comments