21enum GlobalVariableType { min, max, sum };
23template<GlobalVariableType vartype,
class T>
26 std::unordered_map<u64, T> val_map;
28 bool is_reduced =
false;
33 template<
class Lambda>
34 inline void compute_var_patch(
PatchScheduler &sched, Lambda &&compute_fct) {
40 std::is_same<
decltype(compute_fct(id_patch, pdat)), T>::value,
41 "lambda funct should return the Global variable type");
43 val_map[id_patch] = compute_fct(id_patch, pdat);
52 "Global value has not been reduced");
std::uint64_t u64
64 bit unsigned integer
void for_each_patch_data(Function &&fct)
for each macro for patchadata example usage
PatchDataLayer container class, the layout is described in patchdata_layout.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
header for PatchData related function and declaration
Patch object that contain generic patch information.