@@ -11,8 +11,8 @@ open GraphBLAS.FSharp.Objects.ClCellExtensions
1111
1212module internal BFS =
1313 let singleSource
14- ( add : Expr < int option -> int option -> int option >)
15- ( mul : Expr < 'a option -> int option -> int option >)
14+ ( add : Expr < bool option -> bool option -> bool option >)
15+ ( mul : Expr < bool option -> bool option -> bool option >)
1616 ( clContext : ClContext )
1717 workGroupSize
1818 =
@@ -41,7 +41,7 @@ module internal BFS =
4141 zeroCreate queue DeviceOnly vertexCount Dense
4242
4343 let front =
44- ofList queue DeviceOnly Dense vertexCount [ source, 1 ]
44+ ofList queue DeviceOnly Dense vertexCount [ source, true ]
4545
4646 let mutable level = 0
4747 let mutable stop = false
@@ -67,14 +67,14 @@ module internal BFS =
6767 levels
6868
6969 let singleSourceSparse
70- ( add : Expr < int option -> int option -> int option >)
71- ( mul : Expr < 'a option -> int option -> int option >)
70+ ( add : Expr < bool option -> bool option -> bool option >)
71+ ( mul : Expr < bool option -> bool option -> bool option >)
7272 ( clContext : ClContext )
7373 workGroupSize
7474 =
7575
7676 let spMSpV =
77- Operations.SpMSpV add mul clContext workGroupSize
77+ Operations.SpMSpVBool add mul clContext workGroupSize
7878
7979 let zeroCreate =
8080 Vector.zeroCreate clContext workGroupSize
@@ -94,7 +94,7 @@ module internal BFS =
9494 zeroCreate queue DeviceOnly vertexCount Dense
9595
9696 let mutable front =
97- ofList queue DeviceOnly Sparse vertexCount [ source, 1 ]
97+ ofList queue DeviceOnly Sparse vertexCount [ source, true ]
9898
9999 let mutable level = 0
100100 let mutable stop = false
@@ -125,8 +125,8 @@ module internal BFS =
125125
126126
127127 let singleSourcePushPull
128- ( add : Expr < int option -> int option -> int option >)
129- ( mul : Expr < 'a option -> int option -> int option >)
128+ ( add : Expr < bool option -> bool option -> bool option >)
129+ ( mul : Expr < bool option -> bool option -> bool option >)
130130 ( clContext : ClContext )
131131 workGroupSize
132132 =
@@ -135,7 +135,7 @@ module internal BFS =
135135 Operations.SpMVInPlace add mul clContext workGroupSize
136136
137137 let spMSpV =
138- Operations.SpMSpV add mul clContext workGroupSize
138+ Operations.SpMSpVBool add mul clContext workGroupSize
139139
140140 let zeroCreate =
141141 Vector.zeroCreate clContext workGroupSize
@@ -159,7 +159,7 @@ module internal BFS =
159159 ClArray.count Predicates.isSome clContext workGroupSize
160160
161161 //Push or pull functions
162- let getNNZ ( queue : MailboxProcessor < Msg >) ( v : ClVector < int >) =
162+ let getNNZ ( queue : MailboxProcessor < Msg >) ( v : ClVector < bool >) =
163163 match v with
164164 | ClVector.Sparse v -> v.NNZ
165165 | ClVector.Dense v -> countNNZ queue v
@@ -169,14 +169,14 @@ module internal BFS =
169169 let push nnz size =
170170 ( float32 nnz) / ( float32 size) <= SPARSITY
171171
172- fun ( queue : MailboxProcessor < Msg >) ( matrix : ClMatrix < 'a >) ( source : int ) ->
172+ fun ( queue : MailboxProcessor < Msg >) ( matrix : ClMatrix < bool >) ( source : int ) ->
173173 let vertexCount = matrix.RowCount
174174
175175 let levels =
176176 zeroCreate queue DeviceOnly vertexCount Dense
177177
178178 let mutable frontier =
179- ofList queue DeviceOnly Sparse vertexCount [ source, 1 ]
179+ ofList queue DeviceOnly Sparse vertexCount [ source, true ]
180180
181181 let mutable level = 0
182182 let mutable stop = false
0 commit comments