@@ -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
0 commit comments