@@ -109,40 +109,6 @@ static double report_time(const string &msg, event e) {
109
109
return elapsed;
110
110
}
111
111
112
- // This is the class provided to SYCL runtime by the application to decide
113
- // on which device to run, or whether to run at all.
114
- // When selecting a device, SYCL runtime first takes (1) a selector provided by
115
- // the program or a default one and (2) the set of all available devices. Then
116
- // it passes each device to the '()' operator of the selector. Device, for
117
- // which '()' returned the highest number, is selected. If a negative number
118
- // was returned for all devices, then the selection process will cause an
119
- // exception.
120
- class MyDeviceSelector : public cl ::sycl::device_selector {
121
- public:
122
- MyDeviceSelector () {}
123
-
124
- // This is the function which gives a "rating" to devices.
125
- virtual int operator ()(const cl::sycl::device &device) const override {
126
- // The template parameter to device.get_info can be a variety of properties
127
- // defined by the SYCL spec's cl::sycl::info:: enum. Properties may have
128
- // different types. Here we query name which is a string.
129
- const std::string name = device.get_info <cl::sycl::info::device::name>();
130
- std::cout << " Trying device: " << name << " ..." << std::endl;
131
- std::cout << " Vendor: "
132
- << device.get_info <cl::sycl::info::device::vendor>() << std::endl;
133
- if (device.is_gpu ())
134
- return 500 ;
135
- if (device.is_accelerator ())
136
- return 400 ;
137
- if (device.is_cpu ())
138
- return 300 ;
139
- if (device.is_host ())
140
- return 100 ;
141
-
142
- return -1 ;
143
- }
144
- };
145
-
146
112
// The basic idea of vecotrizing transposition can be illustrated by
147
113
// transposing a 2 x 2 matrix as follows:
148
114
//
@@ -414,13 +380,13 @@ int main(int argc, char *argv[]) {
414
380
bool success = true ;
415
381
success &= runTest (MZ, 16 );
416
382
if (argc == 1 ) {
417
- success &= runTest (1U << 10 , 8 );
418
- success &= runTest (1U << 11 , 8 );
419
- success &= runTest (1U << 12 , 8 );
383
+ success &= runTest (1U << 7 , 8 );
384
+ success &= runTest (1U << 8 , 8 );
385
+ success &= runTest (1U << 9 , 8 );
420
386
// success &= runTest(1U << 13, 8);
421
- success &= runTest (1U << 10 , 16 );
422
- success &= runTest (1U << 11 , 16 );
423
- success &= runTest (1U << 12 , 16 );
387
+ success &= runTest (1U << 7 , 16 );
388
+ success &= runTest (1U << 8 , 16 );
389
+ success &= runTest (1U << 9 , 16 );
424
390
// success &= runTest(1U << 13, 16);
425
391
}
426
392
0 commit comments