Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DO NOT MERGE) Tpetra: Sync Behavior Documentation and Unit Testing #13595

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/tpetra/core/src/Tpetra_MultiVector_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ namespace Tpetra {
/// around with multiple memory spaces.
MultiVector (const Teuchos::RCP<const map_type>& map,
const typename dual_view_type::t_dev& d_view);

/// \brief Expert mode constructor, that takes a Kokkos::DualView
/// of the MultiVector's data and the "original"
/// Kokkos::DualView of the data, and returns a MultiVector that
Expand Down Expand Up @@ -841,6 +841,9 @@ namespace Tpetra {
/// that one thread might win; it's that the value might get
/// messed up.)
///
/// GPU synchronization semantics: Will sync if last access was on device.
/// Will not sync if last access was on host.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't think this particular one adds much value. There's already the section describing MV having DualView semantics before the class declaration starts which I think makes this behavior obvious.

That said, for things like putScalar() that have more complicated logic I could see this general kind of comment being useful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vbrunini I was just using this one as a test for the overall comment-and-regression test behavior model.

Yeah, this one should be pretty obvious to the users though :)

///
/// \param gblRow [in] Global row index of the entry to modify.
/// This <i>must</i> be a valid global row index on the calling
/// process with respect to the MultiVector's Map.
Expand Down Expand Up @@ -878,6 +881,9 @@ namespace Tpetra {
/// that one thread might win; it's that the value might get
/// messed up.)
///
/// GPU synchronization semantics: Will sync if last access was on device.
/// Will not sync if last access was on host.
///
/// \param gblRow [in] Global row index of the entry to modify.
/// This <i>must</i> be a valid global row index on the calling
/// process with respect to the MultiVector's Map.
Expand Down
Loading
Loading