Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamcomm
include
shamcomm
local_rank.hpp
Go to the documentation of this file.
1
// -------------------------------------------------------//
2
//
3
// SHAMROCK code for hydrodynamics
4
// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5
// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6
// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7
//
8
// -------------------------------------------------------//
9
10
#pragma once
11
19
#include "
shambase/aliases_int.hpp
"
20
#include <optional>
21
22
namespace
shamcomm
{
23
24
// fetch the current MPI rank within the current node
25
std::optional<u32> node_local_rank();
26
27
// returns true if node_local_rank() is not available, or if it matches main_local_rank_id
28
bool
is_main_node_rank(
u32
main_local_rank_id = 0);
29
30
}
// namespace shamcomm
aliases_int.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
shamcomm
namespace for communication related stuff
Definition
CommunicationBuffer.hpp:36
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8