Skip to content

Commit 63a44e3

Browse files
committed
refactor: formatting
1 parent e33db1a commit 63a44e3

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ module internal MSBFS =
3333
invert queue intersection
3434

3535
let length =
36-
(prefixSum queue intersection)
37-
.ToHostAndFree queue
36+
(prefixSum queue intersection).ToHostAndFree queue
3837

3938
if length = 0 then
4039
None

src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ module Matrix =
261261
let ofList (clContext: ClContext) allocationMode rowCount columnCount (elements: (int * int * 'a) list) =
262262
let rows, columns, values =
263263
let elements = elements |> Array.ofList
264-
elements |> Array.sortInPlaceBy (fun (x, _, _) -> x)
264+
265+
elements
266+
|> Array.sortInPlaceBy (fun (x, _, _) -> x)
267+
265268
elements |> Array.unzip3
266269

267270
{ Context = clContext

src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,9 @@ module ArithmeticOperations =
233233
let float32Mul = createPair 0.0f (*) <@ (*) @>
234234

235235
// without zero
236-
let intAddWithoutZero =
237-
<@ fun x y -> Some (x + y) @>
236+
let intAddWithoutZero = <@ fun x y -> Some(x + y) @>
238237

239-
let intMulWithoutZero =
240-
<@ fun x y -> Some (x * y) @>
238+
let intMulWithoutZero = <@ fun x y -> Some(x * y) @>
241239

242240
// other operations
243241
let less<'a when 'a: comparison> =
@@ -255,7 +253,8 @@ module ArithmeticOperations =
255253
| None, Some y -> Some y
256254
| _ -> None @>
257255

258-
let min<'a when 'a: comparison> = <@ fun (x: 'a) (y: 'a) -> Some (min x y) @>
256+
let min<'a when 'a: comparison> =
257+
<@ fun (x: 'a) (y: 'a) -> Some(min x y) @>
259258

260259
let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @>
261260

tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ let makeTest<'a when 'a: struct> isZero testFun (leftMatrix: 'a [,], rightMatrix
3434
let bitmap = Array.zeroCreate m1.NNZ
3535

3636
leftMatrix
37-
|> Array2D.iteri (fun row col value ->
38-
if row < m2.RowCount
39-
&& col < m2.ColumnCount
40-
&& not <| isZero rightMatrix.[row, col]
41-
&& not <| isZero value then
42-
bitmap.[index] <- 1
43-
44-
if not <| isZero value then
45-
index <- index + 1)
37+
|> Array2D.iteri
38+
(fun row col value ->
39+
if row < m2.RowCount
40+
&& col < m2.ColumnCount
41+
&& not <| isZero rightMatrix.[row, col]
42+
&& not <| isZero value then
43+
bitmap.[index] <- 1
44+
45+
if not <| isZero value then
46+
index <- index + 1)
4647

4748
bitmap
4849

0 commit comments

Comments
 (0)