File tree Expand file tree Collapse file tree
src/GraphBLAS-sharp.Backend/Algorithms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,10 +169,22 @@ module internal MSBFS =
169169
170170 let updateFrontAndLevels = updateFrontAndParents clContext workGroupSize
171171
172- fun ( queue : MailboxProcessor < Msg >) ( matrix : ClMatrix < 'a >) ( source : int list ) ->
173- let vertexCount = matrix .RowCount
172+ fun ( queue : MailboxProcessor < Msg >) ( inputMatrix : ClMatrix < 'a >) ( source : int list ) ->
173+ let vertexCount = inputMatrix .RowCount
174174 let sourceVertexCount = source.Length
175175
176+ let matrix =
177+ match inputMatrix with
178+ | ClMatrix.CSR m ->
179+ { Context = clContext
180+ RowPointers = m.RowPointers
181+ Columns = m.Columns
182+ Values = m.Columns
183+ RowCount = m.RowCount
184+ ColumnCount = m.ColumnCount }
185+ |> ClMatrix.CSR
186+ | _ -> failwith " Incorrect format"
187+
176188 let mutable parents =
177189 source
178190 |> List.mapi ( fun i vertex -> i, vertex, 0 )
@@ -186,7 +198,6 @@ module internal MSBFS =
186198 let mutable stop = false
187199
188200 while not stop do
189-
190201 //Getting new frontier
191202 match spGeMM queue DeviceOnly ( ClMatrix.COO front) matrix with
192203 | None ->
You can’t perform that action at this time.
0 commit comments