-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from dssgabriel/refactor-comm-modes
Refactor comm modes
- Loading branch information
Showing
15 changed files
with
209 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
//@HEADER | ||
// ************************************************************************ | ||
// | ||
// Kokkos v. 4.0 | ||
// Copyright (2022) National Technology & Engineering | ||
// Solutions of Sandia, LLC (NTESS). | ||
// | ||
// Under the terms of Contract DE-NA0003525 with NTESS, | ||
// the U.S. Government retains certain rights in this software. | ||
// | ||
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://kokkos.org/LICENSE for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//@HEADER | ||
|
||
#pragma once | ||
|
||
// See section 3.4 of the MPI standard for a complete specification. | ||
namespace KokkosComm { | ||
|
||
// Standard mode: MPI implementation decides whether outgoing messages will | ||
// be buffered. Send operations can be started whether or not a matching | ||
// receive has been started. They may complete before a matching receive is | ||
// started. Standard mode is non-local: successful completion of the send | ||
// operation may depend on the occurrence of a matching receive. | ||
struct StandardCommMode {}; | ||
|
||
// Ready mode: Send operations may be started only if the matching receive is | ||
// already started. | ||
struct ReadyCommMode {}; | ||
|
||
// Synchronous mode: Send operations complete successfully only if a matching | ||
// receive is started, and the receive operation has started to receive the | ||
// message sent. | ||
struct SynchronousCommMode {}; | ||
|
||
// Default mode: lets the user override the send operations behavior at | ||
// compile-time. E.g., this can be set to mode "Synchronous" for debug | ||
// builds by defining KOKKOSCOMM_FORCE_SYNCHRONOUS_MODE. | ||
#ifdef KOKKOSCOMM_FORCE_SYNCHRONOUS_MODE | ||
using DefaultCommMode = SynchronousCommMode; | ||
#else | ||
using DefaultCommMode = StandardCommMode; | ||
#endif | ||
|
||
} // namespace KokkosComm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.