File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ struct TripleChevronFactory
3434
3535 CUB_RUNTIME_FUNCTION ::cudaError_t PtxVersion (int & version)
3636 {
37- return :: cub::PtxVersion (version);
37+ return cub::PtxVersion (version);
3838 }
3939
4040 CUB_RUNTIME_FUNCTION ::cudaError_t ArchId (::cuda::arch_id& arch_id) const
4141 {
4242 int ptx_version;
43- if (const auto error = :: cub::PtxVersion (ptx_version))
43+ if (const auto error = cub::PtxVersion (ptx_version))
4444 {
4545 return error;
4646 }
Original file line number Diff line number Diff line change 2121#include < cuda/std/optional>
2222
2323#if _CCCL_STD_VER >= 2020
24- # include < concepts>
24+ # include < cuda/std/ concepts>
2525#endif // _CCCL_STD_VER >= 2020
2626
2727#if !_CCCL_COMPILER(NVRTC)
Original file line number Diff line number Diff line change @@ -108,6 +108,17 @@ struct stream_registry_factory_t
108108 return cub::PtxVersion (version);
109109 }
110110
111+ CUB_RUNTIME_FUNCTION cudaError_t ArchId (::cuda::arch_id& arch_id) const
112+ {
113+ int ptx_version;
114+ if (const auto error = cub::PtxVersion (ptx_version))
115+ {
116+ return error;
117+ }
118+ arch_id = cuda::to_arch_id (cuda::compute_capability (ptx_version / 10 ));
119+ return cudaSuccess;
120+ }
121+
111122 CUB_RUNTIME_FUNCTION cudaError_t MultiProcessorCount (int & sm_count) const
112123 {
113124 int device_ordinal;
You can’t perform that action at this time.
0 commit comments