nvcc and use of `[[no_unique_address]]`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 507
- Forks
- 87
- Avg merge
- 15h 27m
- Merged PRs (30d)
- 2
Description
In config.hpp there are these checks for using [[no_unique_address]] or using an emulation of it.
#if !defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
# if ((__has_cpp_attribute(no_unique_address) >= 201803L) && \
(!defined(__NVCC__) || MDSPAN_HAS_CXX_20) && \
(!defined(_MDSPAN_COMPILER_MSVC) || MDSPAN_HAS_CXX_20))
# define _MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS 1
# define _MDSPAN_NO_UNIQUE_ADDRESS [[no_unique_address]]
# else
# define _MDSPAN_NO_UNIQUE_ADDRESS
# endif
#endif
Using of [[no_unique_address]] is disabled if it's compiled by nvcc. Is this just because this was not supported by nvcc at some point?
Current nvcc does support it now (as long as the host compiler supports it).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in config.hpp by reading the preprocessor checks around _MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS and the NVCC condition. Verify the stated current nvcc behavior with a supported host compiler and establish whether the guard still needs to disable [[no_unique_address]]. Done means the configuration behavior is consistent with confirmed compiler support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100