Skip to content

Commit 953be9b

Browse files
committed
refactor: rename functions in binSearch module
1 parent 4f2b965 commit 953be9b

5 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/GraphBLAS-sharp.Backend/Matrix/COOMatrix/Map.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ open GraphBLAS.FSharp.Backend
99
open GraphBLAS.FSharp.Backend.Objects.ClMatrix
1010
open GraphBLAS.FSharp.Backend.Objects.ClContext
1111

12-
1312
module internal Map =
1413
let preparePositions<'a, 'b> (clContext: ClContext) workGroupSize opAdd =
1514

@@ -27,7 +26,7 @@ module internal Map =
2726
(uint64 rowIndex <<< 32) ||| (uint64 columnIndex)
2827

2928
let value =
30-
(%BinSearch.searchCOO) valuesLength index rows columns values
29+
(%BinSearch.byKey2D) valuesLength index rows columns values
3130

3231
match (%op) value with
3332
| Some resultValue ->

src/GraphBLAS-sharp.Backend/Matrix/COOMatrix/Map2.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ module internal Map2 =
2626
(uint64 rowIndex <<< 32) ||| (uint64 columnIndex)
2727

2828
let leftValue =
29-
(%BinSearch.searchCOO) leftValuesLength index leftRows leftColumns leftValues
29+
(%BinSearch.byKey2D) leftValuesLength index leftRows leftColumns leftValues
3030

3131
let rightValue =
32-
(%BinSearch.searchCOO) rightValuesLength index rightRows rightColumn rightValues
32+
(%BinSearch.byKey2D) rightValuesLength index rightRows rightColumn rightValues
3333

3434
match (%op) leftValue rightValue with
3535
| Some value ->

src/GraphBLAS-sharp.Backend/Matrix/CSRMatrix/Map.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module internal Map =
2727
let lastIndex = rowPointers.[rowIndex + 1] - 1
2828

2929
let value =
30-
(%BinSearch.searchInRange) startIndex lastIndex columnIndex columns values
30+
(%BinSearch.inRange) startIndex lastIndex columnIndex columns values
3131

3232
match (%op) value with
3333
| Some resultValue ->

src/GraphBLAS-sharp.Backend/Matrix/CSRMatrix/Map2.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ module internal Map2 =
3030
let rightLastIndex = rightRowPointers.[rowIndex + 1] - 1
3131

3232
let leftValue =
33-
(%BinSearch.searchInRange) leftStartIndex leftLastIndex columnIndex leftColumns leftValues
33+
(%BinSearch.inRange) leftStartIndex leftLastIndex columnIndex leftColumns leftValues
3434

3535
let rightValue =
36-
(%BinSearch.searchInRange) rightStartIndex rightLastIndex columnIndex rightColumn rightValues
36+
(%BinSearch.inRange) rightStartIndex rightLastIndex columnIndex rightColumn rightValues
3737

3838
match (%op) leftValue rightValue with
3939
| Some value ->

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module BinSearch =
1212
/// The index array should have the same length as the array of values.
1313
/// left edge and right edge should be less than the length of the index array.
1414
/// </remarks>
15-
let searchInRange<'a> =
15+
let inRange<'a> =
1616
<@ fun leftEdge rightEdge sourceIndex (indices: ClArray<int>) (values: ClArray<'a>) ->
1717

1818
let mutable leftEdge = leftEdge
@@ -43,7 +43,7 @@ module BinSearch =
4343
/// <remarks>
4444
/// Position is uint64 and it should be written in such format: first 32 bits is row, second 32 bits is column.
4545
/// </remarks>
46-
let searchCOO<'a> =
46+
let byKey2D<'a> =
4747
<@ fun lenght sourceIndex (rowIndices: ClArray<int>) (columnIndices: ClArray<int>) (values: ClArray<'a>) ->
4848

4949
let mutable leftEdge = 0

0 commit comments

Comments
 (0)