You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed coverity in acl_device.cpp: Argument cannot be negative (NEGATIVE_RETURNS)
`acl_get_default_device_global_memory` can return `-1` if no device memory is found. By static_casting it to `size_t`, it makes the -1 into something irrationally big. Therefore, after returning from the function, I added a check to see if `gmem_id` is negative. If it is negative, then I return 0. I assumed that no device private memory means that by default the sizes of global memory, of max constant buffer, and of max device memory allocation are all `0`.
0 commit comments