Skip to content

Commit e699ca1

Browse files
committed
Renamed functions for merge, prepare positions and set positions
1 parent eb74890 commit e699ca1

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/GraphBLAS-sharp/Backend/EWiseAdd.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ open GraphBLAS.FSharp.Backend.Common
77

88
module internal EWiseAdd =
99
let cooNotEmpty (matrixLeft: COOFormat<'a>) (matrixRight: COOFormat<'a>) (mask: Mask2D option) (semiring: Semiring<'a>) : OpenCLEvaluation<COOFormat<'a>> = opencl {
10-
let! allRows, allColumns, allValues = Merge.runM matrixLeft matrixRight mask
10+
let! allRows, allColumns, allValues = Merge.runForMatrix matrixLeft matrixRight mask
1111

1212
let (BinaryOp append) = semiring.PlusMonoid.Append
13-
let! rawPositions = PreparePositions.runM allRows allColumns allValues append
13+
let! rawPositions = PreparePositions.runForMatrix allRows allColumns allValues append
1414

15-
let! resultRows, resultColumns, resultValues = SetPositions.runM allRows allColumns allValues rawPositions
15+
let! resultRows, resultColumns, resultValues = SetPositions.runForMatrix allRows allColumns allValues rawPositions
1616

1717
return {
1818
RowCount = matrixLeft.RowCount
@@ -55,12 +55,12 @@ module internal EWiseAdd =
5555
else cooNotEmpty matrixLeft matrixRight mask semiring
5656

5757
let sparseNotEmpty (leftIndices: int[]) (leftValues: 'a[]) (rightIndices: int[]) (rightValues: 'a[]) (mask: Mask1D option) (semiring: Semiring<'a>) : OpenCLEvaluation<int[] * 'a[]> = opencl {
58-
let! allIndices, allValues = Merge.runV leftIndices leftValues rightIndices rightValues mask
58+
let! allIndices, allValues = Merge.runForVector leftIndices leftValues rightIndices rightValues mask
5959

6060
let (BinaryOp append) = semiring.PlusMonoid.Append
61-
let! rawPositions = PreparePositions.runV allIndices allValues append
61+
let! rawPositions = PreparePositions.runForVector allIndices allValues append
6262

63-
return! SetPositions.runV allIndices allValues rawPositions
63+
return! SetPositions.runForVector allIndices allValues rawPositions
6464
}
6565

6666
let sparse (leftIndices: int[]) (leftValues: 'a[]) (rightIndices: int[]) (rightValues: 'a[]) (mask: Mask1D option) (semiring: Semiring<'a>) : OpenCLEvaluation<int[] * 'a[]> =

src/GraphBLAS-sharp/Backend/Merge.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open GraphBLAS.FSharp
77
open GraphBLAS.FSharp.Backend.Common
88

99
module internal Merge =
10-
let runM (matrixLeft: COOFormat<'a>) (matrixRight: COOFormat<'a>) (mask: Mask2D option) : OpenCLEvaluation<int[] * int[] * 'a[]> = opencl {
10+
let runForMatrix (matrixLeft: COOFormat<'a>) (matrixRight: COOFormat<'a>) (mask: Mask2D option) : OpenCLEvaluation<int[] * int[] * 'a[]> = opencl {
1111
let workGroupSize = Utils.workGroupSize
1212
let firstSide = matrixLeft.Values.Length
1313
let secondSide = matrixRight.Values.Length
@@ -126,7 +126,7 @@ module internal Merge =
126126
return allRows, allColumns, allValues
127127
}
128128

129-
let runV (leftIndices: int[]) (leftValues: 'a[]) (rightIndices: int[]) (rightValues: 'a[]) (mask: Mask1D option) : OpenCLEvaluation<int[] * 'a[]> = opencl {
129+
let runForVector (leftIndices: int[]) (leftValues: 'a[]) (rightIndices: int[]) (rightValues: 'a[]) (mask: Mask1D option) : OpenCLEvaluation<int[] * 'a[]> = opencl {
130130
let workGroupSize = Utils.workGroupSize
131131
let firstSide = leftValues.Length
132132
let secondSide = rightValues.Length

src/GraphBLAS-sharp/Backend/PreparePositions.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open GraphBLAS.FSharp.Backend.Common
77
open Microsoft.FSharp.Quotations
88

99
module internal PreparePositions =
10-
let runM (allRows: int[]) (allColumns: int[]) (allValues: 'a[]) (plus: Expr<'a -> 'a -> 'a>) : OpenCLEvaluation<int[]> = opencl {
10+
let runForMatrix (allRows: int[]) (allColumns: int[]) (allValues: 'a[]) (plus: Expr<'a -> 'a -> 'a>) : OpenCLEvaluation<int[]> = opencl {
1111
let length = allValues.Length
1212

1313
let preparePositions =
@@ -45,7 +45,7 @@ module internal PreparePositions =
4545
return rawPositions
4646
}
4747

48-
let runV (allIndices: int[]) (allValues: 'a[]) (plus: Expr<'a -> 'a -> 'a>) : OpenCLEvaluation<int[]> = opencl {
48+
let runForVector (allIndices: int[]) (allValues: 'a[]) (plus: Expr<'a -> 'a -> 'a>) : OpenCLEvaluation<int[]> = opencl {
4949
let length = allValues.Length
5050

5151
let preparePositions =

src/GraphBLAS-sharp/Backend/SetPositions.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ open Brahma.FSharp.OpenCL.WorkflowBuilder.Evaluation
66
open GraphBLAS.FSharp.Backend.Common
77

88
module internal SetPositions =
9-
let runM (allRows: int[]) (allColumns: int[]) (allValues: 'a[]) (positions: int[]) : OpenCLEvaluation<int[] * int[] * 'a[]> = opencl {
9+
let runForMatrix (allRows: int[]) (allColumns: int[]) (allValues: 'a[]) (positions: int[]) : OpenCLEvaluation<int[] * int[] * 'a[]> = opencl {
1010
let prefixSumArrayLength = positions.Length
1111

1212
let setPositions =
@@ -55,7 +55,7 @@ module internal SetPositions =
5555
return resultRows, resultColumns, resultValues
5656
}
5757

58-
let runV (allIndices: int[]) (allValues: 'a[]) (positions: int[]) : OpenCLEvaluation<int[] * 'a[]> = opencl {
58+
let runForVector (allIndices: int[]) (allValues: 'a[]) (positions: int[]) : OpenCLEvaluation<int[] * 'a[]> = opencl {
5959
let prefixSumArrayLength = positions.Length
6060

6161
let setPositions =

0 commit comments

Comments
 (0)