This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Change cub::DeviceCount to not define static variable in host/device function #1217
Description
The function cub::DeviceCount in file cub/util_device.cuh defines a static variable in a host-only region within a host/device function. NVC++ is being changed to report a compiler error when a device function or a host/device function defines any static variables. NVC++ is currently not smart enough to figure out that the static variable is defined in a host-only region, so it reports an error in DeviceCount. Fixing NVC++ to recognize this situation will take a while. In the meantime, cub::DeviceCount should be changed to not define a static variable. The definition of the static variable should be moved to a separate host-only function.
Activity