Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Functions
scheduler_patch_list.cpp File Reference
#include "shambase/stacktrace.hpp"
#include "nlohmann/json_fwd.hpp"
#include "shamalgs/collective/exchanges.hpp"
#include "shamrock/patch/Patch.hpp"
#include "shamrock/scheduler/HilbertLoadBalance.hpp"
#include "shamrock/scheduler/scheduler_patch_list.hpp"
#include <random>
#include <vector>
+ Include dependency graph for scheduler_patch_list.cpp:

Go to the source code of this file.

Namespaces

namespace  shamrock
 namespace for the main framework
 

Functions

void shamrock::patch::to_json (nlohmann::json &j, const Patch &p)
 Serializes a Patch object to a JSON object.
 
void shamrock::patch::from_json (const nlohmann::json &j, Patch &p)
 Deserializes a JSON object to a Patch object.
 
void to_json (nlohmann::json &j, const SchedulerPatchList &p)
 Serializes a SchedulerPatchList object to a JSON object.
 
void from_json (const nlohmann::json &j, SchedulerPatchList &p)
 Deserializes a JSON object into a SchedulerPatchList object.
 
std::vector< shamrock::patch::Patchmake_fake_patch_list (u32 total_dtcnt, u64 div_limit)
 generate a fake patch list corresponding to a tree structure
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file scheduler_patch_list.cpp.

Function Documentation

◆ from_json() [1/2]

void shamrock::patch::from_json ( const nlohmann::json &  j,
Patch p 
)
inline

Deserializes a JSON object to a Patch object.

Note that this function is implemented here as it is the only place where we need it, thus helping a bit with compile time

Parameters
jThe JSON object to deserialize from.
pThe Patch object to deserialize to.

Definition at line 224 of file scheduler_patch_list.cpp.

◆ from_json() [2/2]

void from_json ( const nlohmann::json &  j,
SchedulerPatchList p 
)

Deserializes a JSON object into a SchedulerPatchList object.

Parameters
jThe JSON object to deserialize from.
pThe SchedulerPatchList object to deserialize into.

Definition at line 244 of file scheduler_patch_list.cpp.

◆ make_fake_patch_list()

std::vector< shamrock::patch::Patch > make_fake_patch_list ( u32  total_dtcnt,
u64  div_limit 
)

generate a fake patch list corresponding to a tree structure

Parameters
total_dtcnttotal data count
div_limitdata count limit to split
Returns
std::vector<Patch> the fake patch list

Definition at line 252 of file scheduler_patch_list.cpp.

◆ to_json() [1/2]

void shamrock::patch::to_json ( nlohmann::json &  j,
const Patch p 
)
inline

Serializes a Patch object to a JSON object.

Note that this function is implemented here as it is the only place where we need it, thus helping a bit with compile time

Parameters
jThe JSON object to serialize to.
pThe Patch object to serialize from.

Definition at line 196 of file scheduler_patch_list.cpp.

◆ to_json() [2/2]

void to_json ( nlohmann::json &  j,
const SchedulerPatchList p 
)

Serializes a SchedulerPatchList object to a JSON object.

Parameters
jThe JSON object to serialize to.
pThe SchedulerPatchList object to serialize.

Definition at line 235 of file scheduler_patch_list.cpp.