Skip to content
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

Closed
brycelelbach/cub_historical_2019_2020
#39
@dkolsen-pgi

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

nvbugHas an associated internal NVIDIA NVBug.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions