@@ -100,7 +100,7 @@ namespace nvexec {
100100 std::stack<cudaStream_t> streams_;
101101 std::mutex mtx_;
102102
103- public:
103+ public:
104104 stream_pool_t () = default ;
105105 stream_pool_t (const stream_pool_t &) = delete ;
106106 stream_pool_t & operator =(const stream_pool_t &) = delete ;
@@ -127,7 +127,7 @@ namespace nvexec {
127127 }
128128
129129 return std::make_pair (stream, status);
130- }
130+ }
131131
132132 cudaStream_t stream = streams_.top ();
133133 streams_.pop ();
@@ -155,7 +155,7 @@ namespace nvexec {
155155 return pools_[static_cast <int >(priority)];
156156 }
157157
158- public:
158+ public:
159159 std::pair<cudaStream_t, cudaError_t> borrow_stream (stream_priority priority) {
160160 return get (priority).borrow_stream (priority);
161161 }
@@ -213,7 +213,6 @@ namespace nvexec {
213213 obj->~T ();
214214 }
215215
216-
217216 struct stream_provider_t {
218217 cudaError_t status_{cudaSuccess};
219218 std::optional<cudaStream_t> own_stream_{};
@@ -325,15 +324,14 @@ namespace nvexec {
325324
326325 template <class BaseEnv >
327326 requires __callable<get_stream_provider_t , const BaseEnv&>
328- BaseEnv make_stream_env (BaseEnv&& base_env, stream_provider_t * ) noexcept {
327+ BaseEnv make_stream_env (BaseEnv&& base_env, stream_provider_t *) noexcept {
329328 return (BaseEnv&&) base_env;
330329 }
331330
332331 template <class BaseEnv >
333- using stream_env =
334- decltype (STDEXEC_STREAM_DETAIL_NS::make_stream_env(
335- __declval<BaseEnv>(),
336- static_cast <stream_provider_t *>(nullptr )));
332+ using stream_env = decltype (STDEXEC_STREAM_DETAIL_NS::make_stream_env(
333+ __declval<BaseEnv>(),
334+ static_cast <stream_provider_t *>(nullptr )));
337335
338336 template <class BaseEnv >
339337 auto make_terminal_stream_env (BaseEnv&& base_env, stream_provider_t * stream_provider) noexcept {
@@ -505,7 +503,7 @@ namespace nvexec {
505503 }
506504
507505 stream_provider_t * get_stream_provider () const {
508- stream_provider_t * stream_provider{};
506+ stream_provider_t * stream_provider{};
509507
510508 if constexpr (borrows_stream) {
511509 const outer_env_t & env = get_env (rcvr_);
@@ -522,12 +520,12 @@ namespace nvexec {
522520 }
523521
524522 template <class T >
525- void defer_temp_storage_destruction (T * ptr) {
523+ void defer_temp_storage_destruction (T* ptr) {
526524 STDEXEC_ASSERT (ptr == this ->temp_storage_ );
527525
528526 if constexpr (!std::is_trivially_destructible_v<T>) {
529527 temp_storage_ = nullptr ; // defer deallocation to the stream provider
530- stream_provider_t * stream_provider = get_stream_provider ();
528+ stream_provider_t * stream_provider = get_stream_provider ();
531529 std::pmr::memory_resource* managed_resource = context_state_.managed_resource_ ;
532530
533531 // Stream is destroyed when the last object is buried, so it's safe to use it here
@@ -543,9 +541,9 @@ namespace nvexec {
543541 } else {
544542 destructor_kernel<<<1 , 1 , 0 , stream>>> (ptr);
545543
546- // TODO Bury all the memory associated with the stream provider and then
544+ // TODO Bury all the memory associated with the stream provider and then
547545 // deallocate the memory
548- cudaStreamSynchronize (stream);
546+ cudaStreamSynchronize (stream);
549547 }
550548
551549 managed_resource->deallocate (ptr, sizeof (T));
@@ -628,7 +626,8 @@ namespace nvexec {
628626
629627 if (op.stream_provider_ .status_ != cudaSuccess) {
630628 // Couldn't allocate memory for operation state, complete with error
631- op.propagate_completion_signal (stdexec::set_error, std::move (op.stream_provider_ .status_ ));
629+ op.propagate_completion_signal (
630+ stdexec::set_error, std::move (op.stream_provider_ .status_ ));
632631 return ;
633632 }
634633
@@ -666,7 +665,8 @@ namespace nvexec {
666665 ReceiverProvider receiver_provider,
667666 context_state_t context_state)
668667 : base_t ((outer_receiver_t &&) out_receiver, context_state)
669- , storage_(make_host<variant_t >(this ->stream_provider_.status_, context_state.pinned_resource_))
668+ , storage_(
669+ make_host<variant_t >(this ->stream_provider_.status_, context_state.pinned_resource_))
670670 , task_(make_host<task_t >(
671671 this ->stream_provider_.status_,
672672 context_state.pinned_resource_,
@@ -675,7 +675,10 @@ namespace nvexec {
675675 this->get_stream(),
676676 context_state.pinned_resource_)
677677 .release())
678- , env_(make_host<env_t >(this ->stream_provider_.status_, context_state.pinned_resource_, this ->make_env ()))
678+ , env_(make_host<env_t >(
679+ this ->stream_provider_.status_,
680+ context_state.pinned_resource_,
681+ this ->make_env ()))
679682 , inner_op_{connect (
680683 (sender_t &&) sender,
681684 stream_enqueue_receiver_t {
0 commit comments