@@ -43,7 +43,7 @@ TEST_F(BatchManip, fill32) {
43
43
testWrapper<float >(N, M, false , [&](float ** batch, float * data) {
44
44
float scalar = 502 ;
45
45
46
- device->algorithms .setToValue (batch, scalar, M, N, device->api ->getDefaultStream ());
46
+ device->algorithms () .setToValue (batch, scalar, M, N, device->api ->getDefaultStream ());
47
47
48
48
std::vector<float > hostVector (N * M, 0 );
49
49
device->api ->copyFromAsync (&hostVector[0 ], data, N * M * sizeof (float ), device->api ->getDefaultStream ());
@@ -60,7 +60,7 @@ TEST_F(BatchManip, touchClean32) {
60
60
const int N = 100 ;
61
61
const int M = 120 ;
62
62
testWrapper<float >(N, M, false , [&](float ** batch, float * data) {
63
- device->algorithms .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
63
+ device->algorithms () .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
64
64
std::vector<float > hostVector (N * M, 1 );
65
65
66
66
device->api ->copyFromAsync (&hostVector[0 ], data, M * N * sizeof (float ), device->api ->getDefaultStream ());
@@ -76,7 +76,7 @@ TEST_F(BatchManip, touchClean32) {
76
76
std::vector<float > hostVector (N * M, 1 );
77
77
78
78
device->api ->copyToAsync (data, &hostVector[0 ], N * M * sizeof (float ), device->api ->getDefaultStream ());
79
- device->algorithms .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
79
+ device->algorithms () .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
80
80
device->api ->copyFromAsync (&hostVector[0 ], data, M * N * sizeof (float ), device->api ->getDefaultStream ());
81
81
82
82
device->api ->syncDefaultStreamWithHost ();
@@ -101,7 +101,7 @@ TEST_F(BatchManip, touchNoClean32) {
101
101
std::vector<float > hostVector (N * M, 1 );
102
102
103
103
device->api ->copyToAsync (data, &hostVector[0 ], N * M * sizeof (float ), device->api ->getDefaultStream ());
104
- device->algorithms .touchBatchedMemory (batch, M, N, false , device->api ->getDefaultStream ());
104
+ device->algorithms () .touchBatchedMemory (batch, M, N, false , device->api ->getDefaultStream ());
105
105
device->api ->copyFromAsync (&hostVector[0 ], data, N * M * sizeof (float ), device->api ->getDefaultStream ());
106
106
107
107
device->api ->syncDefaultStreamWithHost ();
@@ -121,7 +121,7 @@ TEST_F(BatchManip, scatterToUniform32) {
121
121
std::vector<float > hostVector (N * M, 1 );
122
122
123
123
device->api ->copyToAsync (data, &hostVector[0 ], N * M * sizeof (float ), device->api ->getDefaultStream ());
124
- device->algorithms .copyScatterToUniform (const_cast <const float **>(batch), data2, M, M, N, device->api ->getDefaultStream ());
124
+ device->algorithms () .copyScatterToUniform (const_cast <const float **>(batch), data2, M, M, N, device->api ->getDefaultStream ());
125
125
device->api ->copyFromAsync (&hostVector[0 ], data2, N * M * sizeof (float ), device->api ->getDefaultStream ());
126
126
127
127
device->api ->syncDefaultStreamWithHost ();
@@ -142,7 +142,7 @@ TEST_F(BatchManip, uniformToScatter32) {
142
142
std::vector<float > hostVector (N * M, 1 );
143
143
144
144
device->api ->copyToAsync (data2, &hostVector[0 ], N * M * sizeof (float ), device->api ->getDefaultStream ());
145
- device->algorithms .copyUniformToScatter (data2, batch, M, M, N, device->api ->getDefaultStream ());
145
+ device->algorithms () .copyUniformToScatter (data2, batch, M, M, N, device->api ->getDefaultStream ());
146
146
device->api ->copyFromAsync (&hostVector[0 ], data, N * M * sizeof (float ), device->api ->getDefaultStream ());
147
147
148
148
device->api ->syncDefaultStreamWithHost ();
@@ -164,7 +164,7 @@ TEST_F(BatchManip, fill64) {
164
164
testWrapper<double >(N, M, false , [&](double ** batch, double * data) {
165
165
double scalar = 502 ;
166
166
167
- device->algorithms .setToValue (batch, scalar, M, N, device->api ->getDefaultStream ());
167
+ device->algorithms () .setToValue (batch, scalar, M, N, device->api ->getDefaultStream ());
168
168
169
169
std::vector<double > hostVector (N * M, 0 );
170
170
device->api ->copyFromAsync (&hostVector[0 ], data, N * M * sizeof (double ), device->api ->getDefaultStream ());
@@ -181,7 +181,7 @@ TEST_F(BatchManip, touchClean64) {
181
181
const int N = 100 ;
182
182
const int M = 120 ;
183
183
testWrapper<double >(N, M, false , [&](double ** batch, double * data) {
184
- device->algorithms .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
184
+ device->algorithms () .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
185
185
std::vector<double > hostVector (N * M, 1 );
186
186
187
187
device->api ->copyFromAsync (&hostVector[0 ], data, M * N * sizeof (double ), device->api ->getDefaultStream ());
@@ -197,7 +197,7 @@ TEST_F(BatchManip, touchClean64) {
197
197
std::vector<double > hostVector (N * M, 1 );
198
198
199
199
device->api ->copyToAsync (data, &hostVector[0 ], N * M * sizeof (double ), device->api ->getDefaultStream ());
200
- device->algorithms .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
200
+ device->algorithms () .touchBatchedMemory (batch, M, N, true , device->api ->getDefaultStream ());
201
201
device->api ->copyFromAsync (&hostVector[0 ], data, M * N * sizeof (double ), device->api ->getDefaultStream ());
202
202
203
203
device->api ->syncDefaultStreamWithHost ();
@@ -222,7 +222,7 @@ TEST_F(BatchManip, touchNoClean64) {
222
222
std::vector<double > hostVector (N * M, 1 );
223
223
224
224
device->api ->copyToAsync (data, &hostVector[0 ], N * M * sizeof (double ), device->api ->getDefaultStream ());
225
- device->algorithms .touchBatchedMemory (batch, M, N, false , device->api ->getDefaultStream ());
225
+ device->algorithms () .touchBatchedMemory (batch, M, N, false , device->api ->getDefaultStream ());
226
226
device->api ->copyFromAsync (&hostVector[0 ], data, N * M * sizeof (double ), device->api ->getDefaultStream ());
227
227
228
228
device->api ->syncDefaultStreamWithHost ();
@@ -242,7 +242,7 @@ TEST_F(BatchManip, scatterToUniform64) {
242
242
std::vector<double > hostVector (N * M, 1 );
243
243
244
244
device->api ->copyToAsync (data, &hostVector[0 ], N * M * sizeof (double ), device->api ->getDefaultStream ());
245
- device->algorithms .copyScatterToUniform (const_cast <const double **>(batch), data2, M, M, N, device->api ->getDefaultStream ());
245
+ device->algorithms () .copyScatterToUniform (const_cast <const double **>(batch), data2, M, M, N, device->api ->getDefaultStream ());
246
246
device->api ->copyFromAsync (&hostVector[0 ], data2, N * M * sizeof (double ), device->api ->getDefaultStream ());
247
247
248
248
device->api ->syncDefaultStreamWithHost ();
@@ -263,7 +263,7 @@ TEST_F(BatchManip, uniformToScatter64) {
263
263
std::vector<double > hostVector (N * M, 1 );
264
264
265
265
device->api ->copyToAsync (data2, &hostVector[0 ], N * M * sizeof (double ), device->api ->getDefaultStream ());
266
- device->algorithms .copyUniformToScatter (data2, batch, M, M, N, device->api ->getDefaultStream ());
266
+ device->algorithms () .copyUniformToScatter (data2, batch, M, M, N, device->api ->getDefaultStream ());
267
267
device->api ->copyFromAsync (&hostVector[0 ], data, N * M * sizeof (double ), device->api ->getDefaultStream ());
268
268
269
269
device->api ->syncDefaultStreamWithHost ();
0 commit comments