NVIDIA / NVIDIA/cccl

Move thread scopes into a separate header

Open
#945 0 comments 0 reactions 1 assignee Claimed by @wmaxey View on GitHub
libcu++
Dominant language
C++
Stars
2.5k
Forks
487
Avg merge
2d 7h
Merged PRs (30d)
296

Description

The `thread_scope` enum is [gated behind the `atomic` header](https://github.com/NVIDIA/libcudacxx/blob/bda0c48d46ff7d0e3d9dea3240426efe56db6bc7/include/cuda/std/detail/__atomic#L65-L70).

The `atomic` header [emits errors when used with certain SM versions](https://github.com/NVIDIA/libcudacxx/blob/bda0c48d46ff7d0e3d9dea3240426efe56db6bc7/include/cuda/std/detail/__atomic#L9-L11).

`thread_scope` is useful outside of atomics for general scope labeling. It would be useful to have this enum in a separate header without the restrictions of ``. I'd like to see it treated as a `cuda::std` public API available on all platforms.

I'd also like to see it extended with a `warp` value for completeness, but I can make that a separate issue if it warrants more discussion.

cc: @wmaxey & @griwes who brought this up on slack. I've been using these enums in some prototypes and they're really useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.