Skip to content

Commit 4704038

Browse files
committed
RawCommandQueue 3
1 parent 5195a86 commit 4704038

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1511
-1364
lines changed

benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type Benchmarks<'elem when 'elem : struct>(
6969
this.ResultLevels <- this.FunToBenchmark this.Processor matrix vertex
7070

7171
member this.ClearInputMatrix() =
72-
matrix.Dispose this.Processor
72+
matrix.Dispose()
7373

7474
member this.ClearResult() =
7575
match this.ResultLevels with

benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ type Benchmarks(
6868
this.Result <- this.FunToBenchmark this.Processor matrixPrepared Constants.PageRank.accuracy
6969

7070
member this.ClearInputMatrix() =
71-
matrix.Dispose this.Processor
71+
matrix.Dispose()
7272

7373
member this.ClearPreparedMatrix() =
74-
matrixPrepared.Dispose this.Processor
74+
matrixPrepared.Dispose()
7575

7676
member this.ClearResult() = this.Result.Dispose()
7777

benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ type Benchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem : st
7979
this.ResultMatrix <- this.FunToBenchmark this.Processor HostInterop firstMatrix secondMatrix
8080

8181
member this.ClearInputMatrices() =
82-
firstMatrix.Dispose this.Processor
83-
secondMatrix.Dispose this.Processor
82+
firstMatrix.Dispose()
83+
secondMatrix.Dispose()
8484

8585
member this.ClearResult() =
86-
this.ResultMatrix.Dispose this.Processor
86+
this.ResultMatrix.Dispose()
8787

8888
member this.ReadMatrices() =
8989
firstMatrixHost <- this.ReadMatrix <| fst this.InputMatrixReader

benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ type Benchmarks<'elem when 'elem : struct>(
7777
this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly matrix matrix
7878

7979
member this.ClearInputMatrices() =
80-
matrix.Dispose this.Processor
80+
matrix.Dispose()
8181

8282
member this.ClearResult() =
8383
match this.ResultMatrix with
84-
| Some matrix -> matrix.Dispose this.Processor
84+
| Some matrix -> matrix.Dispose()
8585
| None -> ()
8686

8787
member this.ReadMatrices() =

benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ type Masked<'elem when 'elem : struct>(
100100
this.ResultMatrix <- this.FunToBenchmark this.Processor firstMatrix secondMatrix mask
101101

102102
member this.ClearInputMatrices() =
103-
firstMatrix.Dispose this.Processor
104-
secondMatrix.Dispose this.Processor
105-
mask.Dispose this.Processor
103+
firstMatrix.Dispose()
104+
secondMatrix.Dispose()
105+
mask.Dispose()
106106

107107
member this.ClearResult() =
108-
this.ResultMatrix.Dispose this.Processor
108+
this.ResultMatrix.Dispose()
109109

110110
member this.ReadMask(maskReader) =
111111
maskHost <- Matrix.COO <| this.ReadMatrix maskReader

src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,26 @@ module internal MSBFS =
138138
//Getting new frontier
139139
match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with
140140
| None ->
141-
front.Dispose queue
141+
front.Dispose()
142142
stop <- true
143143

144144
| Some newFrontier ->
145-
front.Dispose queue
145+
front.Dispose()
146146

147147
//Filtering visited vertices
148148
match updateFrontAndLevels queue DeviceOnly level newFrontier levels with
149149
| l, Some f ->
150150
front <- f
151151

152-
levels.Dispose queue
152+
levels.Dispose()
153153

154154
levels <- l
155155

156-
newFrontier.Dispose queue
156+
newFrontier.Dispose()
157157

158158
| _, None ->
159159
stop <- true
160-
newFrontier.Dispose queue
160+
newFrontier.Dispose()
161161

162162
ClMatrix.COO levels
163163

@@ -242,24 +242,24 @@ module internal MSBFS =
242242
//Getting new frontier
243243
match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with
244244
| None ->
245-
front.Dispose queue
245+
front.Dispose()
246246
stop <- true
247247

248248
| Some newFrontier ->
249-
front.Dispose queue
249+
front.Dispose()
250250

251251
//Filtering visited vertices
252252
match updateFrontAndParents queue DeviceOnly newFrontier parents with
253253
| p, Some f ->
254254
front <- f
255255

256-
parents.Dispose queue
256+
parents.Dispose()
257257
parents <- p
258258

259-
newFrontier.Dispose queue
259+
newFrontier.Dispose()
260260

261261
| _, None ->
262262
stop <- true
263-
newFrontier.Dispose queue
263+
newFrontier.Dispose()
264264

265265
ClMatrix.COO parents

src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ module PageRank =
1616
type PageRankMatrix =
1717
| PreparedMatrix of ClMatrix<float32>
1818

19-
member this.Dispose(processor: RawCommandQueue) =
19+
member this.Dispose() =
2020
match this with
21-
| PreparedMatrix matrix -> matrix.Dispose processor
21+
| PreparedMatrix matrix -> matrix.Dispose()
2222

2323
let private countOutDegree (clContext: ClContext) workGroupSize =
2424

@@ -111,13 +111,7 @@ module PageRank =
111111
let ndRange =
112112
Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize)
113113

114-
kernel.KernelFunc
115-
ndRange
116-
matrix.RowCount
117-
matrix.RowPointers
118-
matrix.Values
119-
outDegree
120-
resultValues
114+
kernel.KernelFunc ndRange matrix.RowCount matrix.RowPointers matrix.Values outDegree resultValues
121115

122116
queue.RunKernel(kernel)
123117

src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open GraphBLAS.FSharp.Objects
77
module PageRank =
88
[<Sealed>]
99
type PageRankMatrix =
10-
member Dispose : RawCommandQueue -> unit
10+
member Dispose : unit -> unit
1111

1212
val internal prepareMatrix : ClContext -> int -> (RawCommandQueue -> ClMatrix<float32> -> PageRankMatrix)
1313

0 commit comments

Comments
 (0)