Skip to content

Commit

Permalink
Add fence without argument
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Sep 11, 2024
1 parent 3ef74f0 commit b2e84bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/source/API/core/KokkosConcepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ and ``OpenMPTarget``, the current state of the Kokkos |ExecutionSpaceTwo|_ conce
// Required methods:
requires(Ex ex, std::string str, std::ostream& ostr, bool detail) {
{ ex.fence(str) };
{ ex.fence() };
{ ex.name() } -> const char*;
{ ex.concurrency() } -> int;
{ ex.print_configuration(ostr) };
Expand Down
5 changes: 3 additions & 2 deletions docs/source/API/core/execution_spaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ and an instance of that type ``ex``, Kokkos guarantees the following expressions
ex.fence(str);
*Effects:* Upon return, all parallel patterns executed on the instance ``ex`` are guaranteed to have completed, and their effects are guaranteed visible to the calling thread. ``str`` is reported to Kokkos Tools.
*Effects:* Upon return, all parallel patterns executed on the instance ``ex`` are guaranteed to have completed, and their effects are guaranteed visible to the calling thread. The optiopnal ``str`` argument allows customizing the event reported to Kokkos Tools.
*Returns:* Nothing.
*Note:* This *cannot* be called from within a parallel pattern. Doing so will lead to unspecified effects (i.e., it might work, but only for some execution spaces, so be extra careful not to do it).

Expand Down Expand Up @@ -276,6 +276,7 @@ Synopsis
int concurrency() const;
void fence(const std::string&) const;
void fence() const;
friend bool operator==(const execution_space& lhs, const execution_space& rhs);
};
Expand Down Expand Up @@ -319,7 +320,7 @@ Functions

* ``int concurrency() const;`` *Returns* the maximum amount of concurrently executing work items in a parallel setting, i.e. the maximum number of threads utilized by an execution space instance.

* ``void fence(const std::string&) const;`` *Effects:* Upon return, all parallel patterns executed on the instance |ExecutionSpaceConcept|_ are guaranteed to have completed, and their effects are guaranteed visible to the calling thread. *Note:* This *cannot* be called from within a parallel pattern. Doing so will lead to unspecified effects (i.e., it might work, but only for some execution spaces, so be extra careful not to do it). The argument will be reported to Kokkos Tools.
* ``void fence(const std::string& label) const;`` *Effects:* Upon return, all parallel patterns executed on the instance |ExecutionSpaceConcept|_ are guaranteed to have completed, and their effects are guaranteed visible to the calling thread. *Note:* This *cannot* be called from within a parallel pattern. Doing so will lead to unspecified effects (i.e., it might work, but only for some execution spaces, so be extra careful not to do it). The optional ``label`` argument allows customizing the event reported to Kokkos Tools.

* ``void print_configuration(std::ostream ostr) const;``: *Effects:* Outputs the configuration of ``ex`` to the given ``std::ostream``. *Note:* This *cannot* be called from within a parallel pattern.

Expand Down

0 comments on commit b2e84bf

Please sign in to comment.