Skip to content

Commit f118659

Browse files
committed
rename: mask -> fillSubOp, add: maskOp
1 parent c611da2 commit f118659

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/GraphBLAS-sharp.Backend/Common/StandardOperations.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,14 @@ module StandardOperations =
124124
| Some _ -> (%op) leftItem None
125125
| None -> (%op) leftItem (Some value) @>
126126

127-
let mask<'a when 'a: struct> =
127+
let fillSubOp<'a when 'a: struct> =
128128
<@ fun (left: 'a option) (right: 'a option) ->
129129
match left, right with
130130
| _, None -> left
131131
| _ -> right @>
132+
133+
let maskOp<'a, 'b when 'a: struct and 'b: struct> =
134+
<@ fun (left: 'a option) (right: 'b option) ->
135+
match left, right with
136+
| _, Some _ -> left
137+
| _ -> None @>

src/GraphBLAS-sharp.Backend/Vector/Vector.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ module Vector =
188188
<| denseFillVector processor vector mask value
189189

190190
let standardFillSubVector<'a, 'b when 'a: struct and 'b: struct> =
191-
fillSubVector<'a, 'b> StandardOperations.mask<'a>
191+
fillSubVector<'a, 'b> StandardOperations.fillSubOp<'a>
192192

193193
let standardFillSubVectorComplemented<'a, 'b when 'a: struct and 'b: struct> =
194-
fillSubVectorComplemented<'a, 'b> StandardOperations.mask<'a>
194+
fillSubVectorComplemented<'a, 'b> StandardOperations.fillSubOp<'a>
195195

196196
let reduce (clContext: ClContext) (workGroupSize: int) (opAdd: Expr<'a -> 'a -> 'a>) =
197197
let sparseReduce =

0 commit comments

Comments
 (0)