Skip to content

Commit ac507f3

Browse files
committed
Show test platforms
1 parent ab0d760 commit ac507f3

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/cpp/common.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
2525
#endif
2626

27-
#define CHECK_ERR(code) { \
28-
cl_int _err = (code); \
29-
if (_err != CL_SUCCESS) { THROW_ERR(_err); } \
27+
#define CHECK_ERR(code) { \
28+
cl_int _err = (code); \
29+
if (_err != CL_SUCCESS) { \
30+
THROW_ERR(_err); \
31+
} \
3032
}
3133

32-
#define THROW_ERR(code) { \
33-
JS_THROW(opencl::getExceptionMessage(code)); \
34-
RET_UNDEFINED; \
34+
#define THROW_ERR(code) { \
35+
JS_THROW(opencl::getExceptionMessage(code)); \
36+
RET_UNDEFINED; \
3537
}
3638

3739
namespace opencl {

test/utils/device_selection.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ const cl = require('../..');
99

1010
// Grab ALL possible devices into a flat array
1111
const devicesAll = cl.getPlatformIDs().flatMap((platform) => {
12+
console.log('Platform:', platform);
1213
const platformDevices = cl.getDeviceIDs(platform);
14+
console.log('Devices', platformDevices);
1315
const version = cl.getPlatformInfo(platform, cl.PLATFORM_VERSION);
1416

1517
return platformDevices.map((device) => ({
@@ -26,7 +28,7 @@ const cl = require('../..');
2628

2729
const devices = devicesNoDx.length ? devicesNoDx : devicesAll;
2830

29-
const deviceIdx = 1;
31+
const deviceIdx = 0;
3032

3133
global.DEVICES = devices;
3234
global.MAIN_DEVICE = devices[deviceIdx].device;

0 commit comments

Comments
 (0)