Skip to content

Commit 9d52870

Browse files
committed
refactor: remove Mask*
1 parent 946be1b commit 9d52870

6 files changed

Lines changed: 4 additions & 212 deletions

File tree

benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksMxm.fs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ type MxmBenchmarks<'elem when 'elem : struct>(
2626

2727
let mutable firstMatrix = Unchecked.defaultof<ClMatrix<'elem>>
2828
let mutable secondMatrix = Unchecked.defaultof<ClMatrix<'elem>>
29-
let mutable mask = Unchecked.defaultof<ClMask2D>
29+
let mutable mask = Unchecked.defaultof<ClMatrix<_>>
3030

3131
let mutable firstMatrixHost = Unchecked.defaultof<_>
3232
let mutable secondMatrixHost = Unchecked.defaultof<_>
33-
let mutable maskHost = Unchecked.defaultof<Mask2D>
33+
let mutable maskHost = Unchecked.defaultof<Matrix<_>>
3434

3535
member val ResultMatrix = Unchecked.defaultof<ClMatrix<'elem>> with get, set
3636

@@ -108,15 +108,7 @@ type MxmBenchmarks<'elem when 'elem : struct>(
108108
this.ResultMatrix.Dispose this.Processor
109109

110110
member this.ReadMask(maskReader) =
111-
match this.ReadMatrix maskReader with
112-
| Matrix.COO m ->
113-
maskHost <-
114-
{ IsComplemented = false
115-
RowCount = m.RowCount
116-
ColumnCount = m.ColumnCount
117-
Rows = m.Rows
118-
Columns = m.Columns }
119-
| _ -> failwith "Unsupported matrix format"
111+
maskHost <- this.ReadMatrix maskReader
120112

121113
member this.ReadMatrices() =
122114
let matrixReader, maskReader = this.InputMatrixReader
@@ -127,7 +119,7 @@ type MxmBenchmarks<'elem when 'elem : struct>(
127119
member this.LoadMatricesToGPU () =
128120
firstMatrix <- buildMatrix this.OclContext firstMatrixHost
129121
secondMatrix <- buildMatrix this.OclContext secondMatrixHost
130-
mask <- maskHost.ToBackend(this.OclContext)
122+
mask <- maskHost.ToDevice this.OclContext
131123

132124
member this.ConvertSecondMatrixToCSC() =
133125
secondMatrix <- this.FunCSR2CSC this.Processor HostInterop secondMatrix

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<Compile Include="Objects/ArraysExtentions.fs" />
1616
<Compile Include="Objects/Vector.fs" />
1717
<Compile Include="Objects/Matrix.fs" />
18-
<Compile Include="Objects/Masks.fs" />
1918
<Compile Include="Objects/AtLeastOne.fs" />
2019
<Compile Include="Objects/ClContextExtensions.fs" />
2120
<Compile Include="Quotes/SubReduce.fs" />

src/GraphBLAS-sharp.Backend/Mask/GetComplemented.fs

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

src/GraphBLAS-sharp.Backend/Objects/Masks.fs

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

src/GraphBLAS-sharp/GraphBLAS-sharp.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<Compile Include="GraphblasEvaluation.fs" />
2121
<Compile Include="Objects/Matrix.fs" />
2222
<Compile Include="Objects/Scalar.fs" />
23-
<Compile Include="Objects/Masks.fs" />
2423
<Compile Include="Objects/Vector.fs" />
2524
<Compile Include="Objects/VectorExtensions.fs" />
2625
<Compile Include="Objects/MatrixExtensions.fs" />

src/GraphBLAS-sharp/Objects/Masks.fs

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

0 commit comments

Comments
 (0)