clang-tidi

This commit is contained in:
Henri Vasserman 2023-05-20 16:03:25 +03:00
parent 71ac58ae53
commit c29378e5a8
No known key found for this signature in database
GPG key ID: 2995FC0F58B1A986

View file

@ -229,8 +229,11 @@ void ggml_cl_init(void) {
cl_device_id device_ids[NDEV];
cl_int clGetDeviceIDsError = clGetDeviceIDs(p->id, CL_DEVICE_TYPE_ALL, NDEV, device_ids, &p->n_devices);
if (clGetDeviceIDsError == CL_DEVICE_NOT_FOUND) { p->n_devices = 0; }
else { CL_CHECK(clGetDeviceIDsError); }
if (clGetDeviceIDsError == CL_DEVICE_NOT_FOUND) {
p->n_devices = 0;
} else {
CL_CHECK(clGetDeviceIDsError);
}
p->devices = p->n_devices > 0 ? &devices[n_devices] : NULL;
p->default_device = NULL;