File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/GraphBLAS-sharp.Backend/Quotes Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ open Brahma.FSharp
44
55module Search =
66 module Bin =
7+ /// <summary>
8+ /// Searches value in array by key.
9+ /// In case there is a value at the given key position, it is returned.
10+ /// </summary>
711 let byKey < 'a > =
8- <@ fun lenght sourceIndex ( indices : ClArray < int >) ( values : ClArray < 'a >) ->
12+ <@ fun lenght sourceIndex ( keys : ClArray < int >) ( values : ClArray < 'a >) ->
913
1014 let mutable leftEdge = 0
1115 let mutable rightEdge = lenght - 1
@@ -14,7 +18,7 @@ module Search =
1418
1519 while leftEdge <= rightEdge do
1620 let middleIdx = ( leftEdge + rightEdge) / 2
17- let currentIndex = indices .[ middleIdx]
21+ let currentIndex = keys .[ middleIdx]
1822
1923 if sourceIndex = currentIndex then
2024 result <- Some values.[ middleIdx]
@@ -27,6 +31,10 @@ module Search =
2731
2832 result @>
2933
34+ /// <summary>
35+ /// Searches value in array by two keys.
36+ /// In case there is a value at the given keys position, it is returned.
37+ /// </summary>
3038 let byKey2 < 'a > =
3139 <@ fun lenght sourceIndex ( rowIndices : ClArray < int >) ( columnIndices : ClArray < int >) ( values : ClArray < 'a >) ->
3240
You can’t perform that action at this time.
0 commit comments