Skip to content

Commit bba9fca

Browse files
committed
PrefixSum -> ClArray
1 parent 9d2728e commit bba9fca

9 files changed

Lines changed: 189 additions & 424 deletions

File tree

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

Lines changed: 173 additions & 116 deletions
Large diffs are not rendered by default.

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

Lines changed: 0 additions & 290 deletions
This file was deleted.

src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<Compile Include="Common/Utils.fs" />
1616
<Compile Include="Common/Sum.fs" />
1717
<Compile Include="Common\ClArray.fs" />
18-
<Compile Include="Common\PrefixSum.fs" />
1918
<Compile Include="Common/BitonicSort.fs" />
2019
<Compile Include="Common/Scatter.fs" />
2120
<Compile Include="Common/StandardOperations.fs" />
@@ -33,7 +32,6 @@
3332
<Compile Include="Matrix/CSRMatrix/CSRMatrix.fs" />
3433
<Compile Include="Matrix/CSRMatrix/SpMV.fs" />
3534
<Compile Include="Matrix/Matrix.fs" />
36-
<Folder Include="Vector" />
3735
<!--Compile Include="Backend/CSRMatrix/GetTuples.fs" /-->
3836
<!--Compile Include="Backend/CSRMatrix/SpMSpV.fs" /-->
3937
<!--Compile Include="Backend/CSRMatrix/Transpose.fs" /-->

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend
33
open Brahma.FSharp
44
open GraphBLAS.FSharp.Backend
55
open GraphBLAS.FSharp.Backend.Common
6+
open GraphBLAS.FSharp.Backend.Predefined
67
open Microsoft.FSharp.Quotations
78

89
module COOMatrix =
@@ -14,8 +15,7 @@ module COOMatrix =
1415

1516
let valuesScatter = Scatter.runInplace clContext workGroupSize
1617

17-
let sum =
18-
GraphBLAS.FSharp.Backend.ClArray.prefixSumExcludeInplace clContext workGroupSize
18+
let sum = PrefixSum.standardExcludeInplace clContext workGroupSize
1919

2020
let resultLength = Array.zeroCreate 1
2121

@@ -430,7 +430,7 @@ module COOMatrix =
430430
let create = ClArray.create clContext workGroupSize
431431

432432
let scan =
433-
PrefixSum.runBackwardsIncludeInplace <@ min @> clContext workGroupSize
433+
ClArray.prefixSumBackwardsIncludeInplace <@ min @> clContext workGroupSize
434434

435435
fun (processor: MailboxProcessor<_>) (rowIndices: ClArray<int>) rowCount ->
436436

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
namespace GraphBLAS.FSharp.Backend
22

33
open Brahma.FSharp
4-
open GraphBLAS.FSharp.Backend
54
open GraphBLAS.FSharp.Backend.Common
5+
open GraphBLAS.FSharp.Backend
66
open GraphBLAS.FSharp.Backend.Elementwise
77
open Microsoft.FSharp.Quotations
88

@@ -25,7 +25,7 @@ module CSRMatrix =
2525
let create = ClArray.create clContext workGroupSize
2626

2727
let scan =
28-
PrefixSum.runIncludeInplace <@ max @> clContext workGroupSize
28+
ClArray.prefixSumIncludeInplace <@ max @> clContext workGroupSize
2929

3030
fun (processor: MailboxProcessor<_>) (rowPointers: ClArray<int>) nnz rowCount ->
3131

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ open System.Diagnostics.CodeAnalysis
55
open Brahma.FSharp
66
open GraphBLAS.FSharp.Backend
77
open GraphBLAS.FSharp.Backend.Common
8+
open GraphBLAS.FSharp.Backend.Predefined
89
open Microsoft.FSharp.Quotations
910

1011
module internal Elementwise =
@@ -154,8 +155,7 @@ module internal Elementwise =
154155

155156
let setPositions<'a when 'a: struct> (clContext: ClContext) workGroupSize =
156157

157-
let sum =
158-
GraphBLAS.FSharp.Backend.ClArray.prefixSumExcludeInplace clContext workGroupSize
158+
let sum = PrefixSum.standardExcludeInplace clContext workGroupSize
159159

160160
let indicesScatter = Scatter.runInplace clContext workGroupSize
161161

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ namespace GraphBLAS.FSharp.Backend
22

33
open GraphBLAS.FSharp.Backend.Common
44
open Brahma.FSharp
5+
open GraphBLAS.FSharp.Backend.Predefined
56
open GraphBLAS.FSharp.Backend
67
open Microsoft.FSharp.Quotations
7-
open GraphBLAS.FSharp.Backend.Predefined
88

99
module internal SpGEMM =
1010
let private calculate

0 commit comments

Comments
 (0)