@@ -43,7 +43,7 @@ type BoolConfig = Config<bool>
4343type EWiseAddBenchmarks () =
4444 [<ParamsSource( " AvaliableContexts" ) >]
4545 member val OclContext = Unchecked.defaultof< ClContext> with get, set
46-
46+
4747 [<IterationCleanup>]
4848 member this.ClearBuffers () =
4949 let ( ClContext context ) = this.OclContext
@@ -115,9 +115,9 @@ type EWiseAddBenchmarks4Float32() =
115115 Matrix.Build< float32>(
116116 this.FirstMatrix.RowCount,
117117 this.FirstMatrix.ColumnCount,
118- this.FirstMatrix.Rows ,
119- this.FirstMatrix.Columns ,
120- this.FirstMatrix.Values ,
118+ leftRows ,
119+ leftCols ,
120+ leftVals ,
121121 COO
122122 )
123123
@@ -132,9 +132,9 @@ type EWiseAddBenchmarks4Float32() =
132132 Matrix.Build< float32>(
133133 this.SecondMatrix.RowCount,
134134 this.SecondMatrix.ColumnCount,
135- this.SecondMatrix.Rows ,
136- this.SecondMatrix.Columns ,
137- this.SecondMatrix.Values ,
135+ rightRows ,
136+ rightCols ,
137+ rightVals ,
138138 COO
139139 )
140140
@@ -195,6 +195,11 @@ type EWiseAddBenchmarks4Bool() =
195195 [<ParamsSource( " InputMatricesProvider" ) >]
196196 member val InputMatrix = Unchecked.defaultof< InputMatrixFormat< bool>> with get, set
197197
198+ [<GlobalSetup>]
199+ member this.FormInputData () =
200+ this.FirstMatrix <- this.InputMatrix.MatrixStructure
201+ this.SecondMatrix <- this.InputMatrix.MatrixStructure |> Utils.transposeCOO
202+
198203 [<IterationSetup>]
199204 member this.BuildCOO () =
200205 let leftRows = Array.zeroCreate< int> this.FirstMatrix.Rows.Length
@@ -207,9 +212,9 @@ type EWiseAddBenchmarks4Bool() =
207212 Matrix.Build< bool>(
208213 this.FirstMatrix.RowCount,
209214 this.FirstMatrix.ColumnCount,
210- this.FirstMatrix.Rows ,
211- this.FirstMatrix.Columns ,
212- this.FirstMatrix.Values ,
215+ leftRows ,
216+ leftCols ,
217+ leftVals ,
213218 COO
214219 )
215220
@@ -223,9 +228,9 @@ type EWiseAddBenchmarks4Bool() =
223228 Matrix.Build< bool>(
224229 this.SecondMatrix.RowCount,
225230 this.SecondMatrix.ColumnCount,
226- this.SecondMatrix.Rows ,
227- this.SecondMatrix.Columns ,
228- this.SecondMatrix.Values ,
231+ rightRows ,
232+ rightCols ,
233+ rightVals ,
229234 COO
230235 )
231236
0 commit comments