File tree Expand file tree Collapse file tree 4 files changed +25
-22
lines changed
cudax/include/cuda/experimental
libcudacxx/include/cuda/std/__execution Expand file tree Collapse file tree 4 files changed +25
-22
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ struct sync_wait_t;
134
134
struct start_detached_t ;
135
135
136
136
// queries:
137
- struct forwarding_query_t ;
138
137
struct get_allocator_t ;
139
138
struct get_stop_token_t ;
140
139
struct get_scheduler_t ;
Original file line number Diff line number Diff line change @@ -41,26 +41,10 @@ _CCCL_SUPPRESS_DEPRECATED_POP
41
41
42
42
namespace cuda ::experimental::execution
43
43
{
44
+ using _CUDA_STD_EXEC::__forwarding_query;
44
45
using _CUDA_STD_EXEC::__queryable_with;
45
-
46
- // ////////////////////////////////////////////////////////////////////////////////////////
47
- // forwarding_query_t
48
- _CCCL_GLOBAL_CONSTANT struct forwarding_query_t
49
- {
50
- template <class _Tag >
51
- [[nodiscard]] _CCCL_API constexpr auto operator ()(_Tag) const noexcept -> bool
52
- {
53
- if constexpr (__queryable_with<_Tag, forwarding_query_t >)
54
- {
55
- static_assert (noexcept (_Tag ().query (*this )));
56
- return _Tag ().query (*this );
57
- }
58
- return _CUDA_VSTD::derived_from<_Tag, forwarding_query_t >;
59
- }
60
- } forwarding_query{};
61
-
62
- template <class _Tag >
63
- _CCCL_CONCEPT __forwarding_query = _CCCL_REQUIRES_EXPR((_Tag))(forwarding_query(_Tag{}));
46
+ using _CUDA_STD_EXEC::forwarding_query;
47
+ using _CUDA_STD_EXEC::forwarding_query_t ;
64
48
65
49
// ////////////////////////////////////////////////////////////////////////////////////////
66
50
// get_allocator
Original file line number Diff line number Diff line change 24
24
#include < cuda/std/__concepts/concept_macros.h>
25
25
#include < cuda/std/__concepts/convertible_to.h>
26
26
#include < cuda/std/__cuda/api_wrapper.h>
27
+ #include < cuda/std/__execution/env.h>
27
28
#include < cuda/std/__type_traits/is_convertible.h>
28
29
#include < cuda/stream_ref>
29
30
30
- #include < cuda/experimental/__execution/queries.cuh>
31
31
#include < cuda/experimental/__stream/stream.cuh>
32
32
33
33
#include < cuda_runtime_api.h>
@@ -83,7 +83,7 @@ struct get_stream_t
83
83
return __env.query (*this );
84
84
}
85
85
86
- [[nodiscard]] _CCCL_HIDE_FROM_ABI static constexpr auto query (execution ::forwarding_query_t ) noexcept -> bool
86
+ [[nodiscard]] _CCCL_HIDE_FROM_ABI static constexpr auto query (_CUDA_STD_EXEC ::forwarding_query_t ) noexcept -> bool
87
87
{
88
88
return true ;
89
89
}
Original file line number Diff line number Diff line change 22
22
#endif // no system header
23
23
24
24
#include < cuda/std/__concepts/concept_macros.h>
25
+ #include < cuda/std/__concepts/derived_from.h>
25
26
#include < cuda/std/__functional/reference_wrapper.h>
26
27
#include < cuda/std/__tuple_dir/ignore.h>
27
28
#include < cuda/std/__type_traits/enable_if.h>
@@ -373,6 +374,25 @@ _CCCL_GLOBAL_CONSTANT get_env_t get_env{};
373
374
template <class _Ty >
374
375
using env_of_t _CCCL_NODEBUG_ALIAS = decltype (get_env(declval<_Ty>()));
375
376
377
+ // ////////////////////////////////////////////////////////////////////////////////////////
378
+ // forwarding_query_t
379
+ _CCCL_GLOBAL_CONSTANT struct forwarding_query_t
380
+ {
381
+ template <class _Tag >
382
+ [[nodiscard]] _CCCL_API constexpr auto operator ()(_Tag) const noexcept -> bool
383
+ {
384
+ if constexpr (__queryable_with<_Tag, forwarding_query_t >)
385
+ {
386
+ static_assert (noexcept (_Tag ().query (*this )));
387
+ return _Tag ().query (*this );
388
+ }
389
+ return _CUDA_VSTD::derived_from<_Tag, forwarding_query_t >;
390
+ }
391
+ } forwarding_query{};
392
+
393
+ template <class _Tag >
394
+ _CCCL_CONCEPT __forwarding_query = _CCCL_REQUIRES_EXPR((_Tag))(forwarding_query(_Tag{}));
395
+
376
396
_LIBCUDACXX_END_NAMESPACE_EXECUTION
377
397
378
398
#include < cuda/std/__cccl/epilogue.h>
You can’t perform that action at this time.
0 commit comments