OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
ThreadInfo.hpp
Go to the documentation of this file.
1
16
17#ifndef OPENSWMM_CORE_THREADINFO_HPP
18#define OPENSWMM_CORE_THREADINFO_HPP
19
20#include <string>
21#include <vector>
22
23namespace openswmm {
24namespace threadinfo {
25
30int logicalCpus();
31
39int ompMaxThreads();
40
45int ompAvailable();
46
51int perfCores();
52
62
70
79void setKokkosOmpThreads(int n);
80
95int resolveRequested(int requested, const char* what, std::vector<std::string>* warnings);
96
104bool isOversubscribed(int threads);
105
108constexpr int kMinConduitsPerThread = 100;
109
125int dwThreads(int requested, int n_conduits, std::vector<std::string>* warnings);
126
142int twoDThreads(int requested, int n_triangles, std::vector<std::string>* warnings);
143
144} // namespace threadinfo
145} // namespace openswmm
146
147#endif // OPENSWMM_CORE_THREADINFO_HPP
Definition ThreadInfo.cpp:26
int ompMaxThreads()
Query the current calling-context OpenMP maximum.
Definition ThreadInfo.cpp:37
int perfCores()
Query macOS performance-cluster logical CPU count.
Definition ThreadInfo.cpp:54
void setKokkosOmpThreads(int n)
Store the engine-recorded Kokkos OpenMP team hint.
Definition ThreadInfo.cpp:70
int logicalCpus()
Query OS-visible logical CPU concurrency.
Definition ThreadInfo.cpp:32
int kokkosOmpThreads()
Read the engine-recorded Kokkos OpenMP team hint.
Definition ThreadInfo.cpp:66
bool isOversubscribed(int threads)
Compare a team plus host reservation with known logical concurrency.
Definition ThreadInfo.cpp:82
int resolveRequested(int requested, const char *what, std::vector< std::string > *warnings)
Resolve a thread request and optionally append oversubscription diagnostics.
Definition ThreadInfo.cpp:87
constexpr int kMinConduitsPerThread
Definition ThreadInfo.hpp:108
int twoDThreads(int requested, int n_triangles, std::vector< std::string > *warnings)
Resolve a 2D marcher team request using core and triangle-count heuristics.
Definition ThreadInfo.cpp:173
int dwThreads(int requested, int n_conduits, std::vector< std::string > *warnings)
Resolve a dynamic-wave team request with model-size and automatic core caps.
Definition ThreadInfo.cpp:137
int ompAvailable()
Report whether engine OpenMP support was compiled.
Definition ThreadInfo.cpp:46
int hostReservedThreads()
Read host thread reservation from the current environment.
Definition ThreadInfo.cpp:74
Definition ExchangeLaw.hpp:60