|
core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
|
Functions | |
| int | affinityCpus () |
| CPUs in this process's affinity mask, or 0 if that cannot be determined. | |
| std::string | readFirstLine (const std::string &path) |
| First whitespace-separated fields of a file, or an empty string if it cannot be read. | |
| std::string | cgroupPath (const std::string &procSelfCgroup, const std::string &controller) |
The cgroup path of this process for controller ("" = the v2 unified hierarchy), e.g. | |
| int | quotaFromCpuMax (const std::string &file) |
CPUs allowed by one cgroup-v2 cpu.max file ("max 100000" or "200000 100000"), rounded UP so a fractional budget still gets one thread. | |
| int | quotaFromCfs (const std::string &dir) |
The same for cgroup v1's pair of files in dir. 0 = no limit here. | |
| int | cgroupQuota (const std::string &cgroupRoot, const std::string &procSelfCgroup) |
| The tightest CPU quota binding this process, walking from its own cgroup up to the root. | |
| template<class Real > | |
| PECLET_HD Real | hdSqrt (Real v) |
| template<class Real > | |
| PECLET_HD Real | hdAbs (Real v) |
| template<class Real > | |
| PECLET_HD Real | hdMax (Real a, Real b) |
| template<class Real > | |
| PECLET_HD Real | hdMin (Real a, Real b) |
| template<class Real > | |
| PECLET_HD Real | hdPow (Real a, Real b) |
| template<class Real > | |
| PECLET_HD Real | hdNearbyint (Real v) |
| template<class Real > | |
| PECLET_HD Real | hdFloor (Real v) |
| template<class Real > | |
| PECLET_HD Real | hdFma (Real a, Real b, Real c) |
| template<class Real > | |
| PECLET_HD Real | cmpMax (Real a, Real b) |
Comparison-based max, <-ordered (ties keep the earlier operand) — std::max semantics, NOT fmax's NaN-swallowing ones. | |
|
inline |
CPUs in this process's affinity mask, or 0 if that cannot be determined.
Definition at line 40 of file cpu_budget.hpp.
Referenced by peclet::core::defaultHostThreads(), and peclet::core::usableCpus().
|
inline |
First whitespace-separated fields of a file, or an empty string if it cannot be read.
Definition at line 51 of file cpu_budget.hpp.
Referenced by quotaFromCfs(), and quotaFromCpuMax().
|
inline |
The cgroup path of this process for controller ("" = the v2 unified hierarchy), e.g.
"/user.slice/user-1000.slice/session-3.scope". Empty if absent.
Definition at line 61 of file cpu_budget.hpp.
Referenced by cgroupQuota().
CPUs allowed by one cgroup-v2 cpu.max file ("max 100000" or "200000 100000"), rounded UP so a fractional budget still gets one thread.
0 = no limit here (or no such file).
Definition at line 86 of file cpu_budget.hpp.
References readFirstLine().
Referenced by cgroupQuota().
The same for cgroup v1's pair of files in dir. 0 = no limit here.
Definition at line 97 of file cpu_budget.hpp.
References readFirstLine().
Referenced by cgroupQuota().
|
inline |
The tightest CPU quota binding this process, walking from its own cgroup up to the root.
0 = no quota anywhere. Split out from usableCpus() so a test can point it at a fixture tree.
Definition at line 107 of file cpu_budget.hpp.
References cgroupPath(), quotaFromCfs(), and quotaFromCpuMax().
Referenced by peclet::core::usableCpus().
Definition at line 143 of file portable.hpp.
Referenced by peclet::core::geom::prim::Sphere< Real >::eval(), peclet::core::geom::prim::Box< Real >::eval(), peclet::core::geom::prim::HollowCylinder< Real >::eval(), peclet::core::geom::prim::HollowCylinderShell< Real >::eval(), peclet::core::geom::prim::Capsule< Real >::eval(), peclet::core::geom::prim::Torus< Real >::eval(), peclet::core::geom::prim::Cone< Real >::eval(), peclet::core::geom::prim::Ellipsoid< Real >::eval(), peclet::core::geom::prim::Superquadric< Real >::eval(), peclet::core::geom::evalSphereUnion(), peclet::core::geom::evalSphereUnionSubset(), peclet::core::geom::prim::Sphere< Real >::grad(), peclet::core::geom::prim::Box< Real >::grad(), peclet::core::geom::prim::HollowCylinder< Real >::grad(), peclet::core::geom::prim::HollowCylinderShell< Real >::grad(), peclet::core::geom::prim::Capsule< Real >::grad(), peclet::core::geom::prim::Torus< Real >::grad(), peclet::core::geom::sampleGrid(), peclet::core::geom::sphereUnionEvalOwner(), peclet::core::geom::sphereUnionEvalOwnerGrid(), and peclet::core::geom::sphereUnionOwnerSubset().
Definition at line 147 of file portable.hpp.
Referenced by peclet::core::geom::prim::Box< Real >::eval(), peclet::core::geom::prim::HollowCylinder< Real >::eval(), peclet::core::geom::prim::Cone< Real >::eval(), peclet::core::geom::prim::Superquadric< Real >::eval(), peclet::core::geom::prim::HollowCylinderShell< Real >::evalRZ(), peclet::core::geom::prim::Box< Real >::grad(), peclet::core::geom::prim::HollowCylinder< Real >::grad(), and peclet::core::geom::prim::HollowCylinderShell< Real >::grad().
Definition at line 151 of file portable.hpp.
Referenced by peclet::core::geom::prim::Box< Real >::eval(), peclet::core::geom::prim::HollowCylinder< Real >::eval(), peclet::core::geom::prim::Capsule< Real >::eval(), peclet::core::geom::prim::Cone< Real >::eval(), peclet::core::geom::prim::Superquadric< Real >::eval(), peclet::core::geom::evalTree(), peclet::core::geom::evalTreeGrad(), peclet::core::geom::prim::Box< Real >::grad(), peclet::core::geom::prim::HollowCylinder< Real >::grad(), peclet::core::geom::prim::Capsule< Real >::grad(), and peclet::core::geom::sampleGrid().
Definition at line 155 of file portable.hpp.
Referenced by peclet::core::geom::prim::Box< Real >::eval(), peclet::core::geom::prim::HollowCylinder< Real >::eval(), peclet::core::geom::prim::Capsule< Real >::eval(), peclet::core::geom::prim::Cone< Real >::eval(), peclet::core::geom::prim::Ellipsoid< Real >::eval(), peclet::core::geom::prim::Superquadric< Real >::eval(), peclet::core::geom::evalTree(), peclet::core::geom::evalTreeGrad(), peclet::core::geom::prim::Capsule< Real >::grad(), and peclet::core::geom::sampleGrid().
Definition at line 159 of file portable.hpp.
Referenced by peclet::core::geom::prim::Superquadric< Real >::eval().
Definition at line 163 of file portable.hpp.
Definition at line 167 of file portable.hpp.
Referenced by peclet::core::geom::CandidateGridView< Real >::binOf(), and peclet::core::geom::buildSphereCandidateGrid().
Definition at line 171 of file portable.hpp.
Comparison-based max, <-ordered (ties keep the earlier operand) — std::max semantics, NOT fmax's NaN-swallowing ones.
HollowCylinderShell needs exactly this to stay bit-faithful to core's std::max({...}) and voro's chained ternaries; everything ported from dem uses hdMax.
Definition at line 180 of file portable.hpp.
Referenced by peclet::core::geom::prim::HollowCylinderShell< Real >::evalRZ().