Skip to content

Commit 7349c1d

Browse files
committed
refactor: formatting
1 parent 5571002 commit 7349c1d

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ open GraphBLAS.FSharp.Backend.Objects
55
module ArithmeticOperations =
66
let inline mkOpWithConst zero op constant =
77
<@ fun x ->
8-
let mutable res = zero
8+
let mutable res = zero
99

10-
match x with
11-
| Some v -> res <- (op v constant)
12-
| None -> res <- constant
10+
match x with
11+
| Some v -> res <- (op v constant)
12+
| None -> res <- constant
1313

14-
if res = zero then None else Some res @>
14+
if res = zero then None else Some res @>
1515

1616
let inline mkNumericSum zero =
1717
<@ fun (x: 't option) (y: 't option) ->

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,3 @@ module BinSearch =
5252
leftEdge <- middleIdx + 1
5353

5454
result @>
55-

tests/GraphBLAS-sharp.Tests/Matrix/Map.fs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,14 @@ let testFixturesMapAdd case =
116116
let q = case.TestContext.Queue
117117
q.Error.Add(fun e -> failwithf "%A" e)
118118

119-
let addFloat64Q = ArithmeticOperations.mkOpWithConst 0.0 (+) 10.0
120-
let addFloat32Q = ArithmeticOperations.mkOpWithConst 0.0f (+) 10.0f
121-
let addByte = ArithmeticOperations.mkOpWithConst 0uy (+) 10uy
119+
let addFloat64Q =
120+
ArithmeticOperations.mkOpWithConst 0.0 (+) 10.0
121+
122+
let addFloat32Q =
123+
ArithmeticOperations.mkOpWithConst 0.0f (+) 10.0f
124+
125+
let addByte =
126+
ArithmeticOperations.mkOpWithConst 0uy (+) 10uy
122127

123128
if Utils.isFloat64Available context.ClDevice then
124129
createTestMap case 0.0 ((+) 10.0) Utils.floatIsEqual addFloat64Q Matrix.map
@@ -134,9 +139,14 @@ let testFixturesMapMul case =
134139
let q = case.TestContext.Queue
135140
q.Error.Add(fun e -> failwithf "%A" e)
136141

137-
let mulFloat64Q = ArithmeticOperations.mkOpWithConst 0.0 (*) 10.0
138-
let mulFloat32Q = ArithmeticOperations.mkOpWithConst 0.0f (*) 10.0f
139-
let mulByte = ArithmeticOperations.mkOpWithConst 0uy (*) 10uy
142+
let mulFloat64Q =
143+
ArithmeticOperations.mkOpWithConst 0.0 (*) 10.0
144+
145+
let mulFloat32Q =
146+
ArithmeticOperations.mkOpWithConst 0.0f (*) 10.0f
147+
148+
let mulByte =
149+
ArithmeticOperations.mkOpWithConst 0uy (*) 10uy
140150

141151
if Utils.isFloat64Available context.ClDevice then
142152
createTestMap case 0.0 ((*) 10.0) Utils.floatIsEqual mulFloat64Q Matrix.map

0 commit comments

Comments
 (0)