diff --git a/docs/sphinx/api/public_distributed_api.rst b/docs/sphinx/api/public_distributed_api.rst index bc5cbe322a73..8de04e45ec74 100644 --- a/docs/sphinx/api/public_distributed_api.rst +++ b/docs/sphinx/api/public_distributed_api.rst @@ -157,23 +157,23 @@ Classes | :cpp:class:`hpx::distributed::latch` | +--------------------------------------+ -Functions ---------- - -.. table:: `hpx` functions of header ``hpx/latch.hpp`` - - +---------------------------------------------------+ - | Function | - +===================================================+ - | :cpp:func:`hpx::distributed::count_down_and_wait` | - +---------------------------------------------------+ - | :cpp:func:`hpx::distributed::arrive_and_wait` | - +---------------------------------------------------+ - | :cpp:func:`hpx::distributed::count_down` | - +---------------------------------------------------+ - | :cpp:func:`hpx::distributed::is_ready` | - +---------------------------------------------------+ - | :cpp:func:`hpx::distributed::try_wait` | - +---------------------------------------------------+ - | :cpp:func:`hpx::distributed::wait` | - +---------------------------------------------------+ +Member functions +^^^^^^^^^^^^^^^^ + +.. table:: `hpx` functions of class :cpp:class:`hpx::distributed::latch` from header ``hpx/latch.hpp`` + + +----------------------------------------------------------+ + | Function | + +==========================================================+ + | :cpp:func:`hpx::distributed::latch::count_down_and_wait` | + +----------------------------------------------------------+ + | :cpp:func:`hpx::distributed::latch::arrive_and_wait` | + +----------------------------------------------------------+ + | :cpp:func:`hpx::distributed::latch::count_down` | + +----------------------------------------------------------+ + | :cpp:func:`hpx::distributed::latch::is_ready` | + +----------------------------------------------------------+ + | :cpp:func:`hpx::distributed::latch::try_wait` | + +----------------------------------------------------------+ + | :cpp:func:`hpx::distributed::latch::wait` | + +----------------------------------------------------------+ diff --git a/docs/sphinx/releases/whats_new_1_10_0.rst b/docs/sphinx/releases/whats_new_1_10_0.rst index c456af6f98e0..bda7bbce7f61 100644 --- a/docs/sphinx/releases/whats_new_1_10_0.rst +++ b/docs/sphinx/releases/whats_new_1_10_0.rst @@ -97,6 +97,7 @@ Closed issues Closed pull requests ==================== +* :hpx-pr:`6493` - Fix distributed latch documentation * :hpx-pr:`6492` - Fix kokkos hpx nvcc compilation * :hpx-pr:`6491` - More fixes to handling bool arguments for collective operations * :hpx-pr:`6490` - Remove the default max cpu count diff --git a/libs/full/collectives/include/hpx/collectives/latch.hpp b/libs/full/collectives/include/hpx/collectives/latch.hpp index 282e02b16907..d6f26bde0fc7 100644 --- a/libs/full/collectives/include/hpx/collectives/latch.hpp +++ b/libs/full/collectives/include/hpx/collectives/latch.hpp @@ -10,93 +10,6 @@ #pragma once -#if defined(DOXYGEN) -// clang-format off -namespace hpx { namespace distributed { - - /// Latch is an implementation of a synchronization primitive that allows - /// multiple threads to wait for a shared event to occur before proceeding. - /// This latch can be invoked in a distributed application. - /// - /// For a local only latch \see hpx::latch. - class HPX_EXPORT latch; - - /// Initialize the latch - /// - /// Requires: count >= 0. - /// Synchronization: None - /// Postconditions: counter_ == count. - /// - explicit latch(std::ptrdiff_t count); - - /// Extension: Create a client side representation for the existing - /// \a server#latch instance with the given global id \a id. - latch(hpx::id_type const& id); - - /// Extension: Create a client side representation for the existing - /// \a server#latch instance with the given global id \a id. - latch(hpx::future&& f); - - /// Extension: Create a client side representation for the existing - /// \a server#latch instance with the given global id \a id. - latch(hpx::shared_future const& id); - - /// Decrements counter_ by 1 . Blocks at the synchronization point - /// until counter_ reaches 0. - /// - /// Requires: counter_ > 0. - /// - /// Synchronization: Synchronizes with all calls that block on this - /// latch and with all is_ready calls on this latch that return true. - /// - /// \throws Nothing. - void count_down_and_wait(); - - /// Decrements counter_ by update . Blocks at the synchronization point - /// until counter_ reaches 0. - /// - /// Requires: counter_ > 0. - /// - /// Synchronization: Synchronizes with all calls that block on this - /// latch and with all is_ready calls on this latch that return true. - /// - /// \throws Nothing. - void arrive_and_wait(); - - /// Decrements counter_ by n. Does not block. - /// - /// Requires: counter_ >= n and n >= 0. - /// - /// Synchronization: Synchronizes with all calls that block on this - /// latch and with all is_ready calls on this latch that return true . - /// - /// \throws Nothing. - void count_down(std::ptrdiff_t n); - - /// Returns: counter_ == 0. Does not block. - /// - /// \throws Nothing. - bool is_ready() const noexcept; - - /// Returns: counter_ == 0. Does not block. - /// - /// \throws Nothing. - /// - bool try_wait() const noexcept; - - /// If counter_ is 0, returns immediately. Otherwise, blocks the - /// calling thread at the synchronization point until counter_ - /// reaches 0. - /// - /// \throws Nothing. - /// - void wait() const; - -}} // namespace hpx::distributed - -// clang-format on -#else - #include #include #include @@ -257,5 +170,3 @@ namespace hpx::lcos { } // namespace hpx::lcos #include - -#endif // DOXYGEN