@@ -73,15 +73,17 @@ TEST_F(ArrayManip, touchNoClean32) {
7373 device->api ->freeGlobMem (arr);
7474}
7575
76+ // avoid double, due to some archs (also in the CI) don't seem to thoroughly support it
77+
7678TEST_F (ArrayManip, touchClean64) {
7779
7880 const int N = 100 ;
79- double * arr = (double *)device->api ->allocGlobMem (N * sizeof (double ));
81+ long * arr = (long *)device->api ->allocGlobMem (N * sizeof (long ));
8082 device->algorithms .touchMemory (arr, N, true , device->api ->getDefaultStream ());
81- std::vector<double > hostVector (N, 1 );
83+ std::vector<long > hostVector (N, 1 );
8284
8385 device->api ->copyFromAsync (
84- &hostVector[0 ], arr, N * sizeof (double ), device->api ->getDefaultStream ());
86+ &hostVector[0 ], arr, N * sizeof (long ), device->api ->getDefaultStream ());
8587
8688 device->api ->syncDefaultStreamWithHost ();
8789
@@ -95,14 +97,13 @@ TEST_F(ArrayManip, touchClean64) {
9597TEST_F (ArrayManip, touchNoClean64) {
9698
9799 const int N = 100 ;
98- double * arr = (double *)device->api ->allocGlobMem (N * sizeof (double ));
99- std::vector<double > hostVector (N, 0 );
100+ long * arr = (long *)device->api ->allocGlobMem (N * sizeof (long ));
101+ std::vector<long > hostVector (N, 0 );
100102
101- device->api ->copyToAsync (
102- arr, &hostVector[0 ], N * sizeof (double ), device->api ->getDefaultStream ());
103+ device->api ->copyToAsync (arr, &hostVector[0 ], N * sizeof (long ), device->api ->getDefaultStream ());
103104 device->algorithms .touchMemory (arr, N, false , device->api ->getDefaultStream ());
104105 device->api ->copyFromAsync (
105- &hostVector[0 ], arr, N * sizeof (double ), device->api ->getDefaultStream ());
106+ &hostVector[0 ], arr, N * sizeof (long ), device->api ->getDefaultStream ());
106107
107108 device->api ->syncDefaultStreamWithHost ();
108109
0 commit comments