Struct DryRunOps¶
Defined in File result.hpp
Struct Documentation¶
-
struct DryRunOps¶
Shared op bodies for the two DryRun Result concrete types.
Both
ResultDryRunandResultDryRunNestedcarry exactly an (index list, ExtentOverrides, CostModel) triple and differ only in what they additionally expose (ResultDryRunNestedsplits its index list into outer()/inner() views for CSV-composite-aware inspection/testing). Implemented once here so the two classes’ prod/sum/permute/slice_mode/ mode_batches bodies are one-line forwards, not near-duplicated logic.Public Static Functions
-
static inline void record_op_cost(CostModel const &cm, double flops, double exec)¶
Publish one op’s realized-extent
flops/exec:to the eval loop’s build tally (through last_op_flops/last_op_exec), to the eval trace, and to the replay cost sink if one is attached tocm. Called only when the eval trace is on.
Element-wise power: the result has the operand’s shape (and slicing). Its cost, one operation per element, is recorded like a product’s.
Broadcast: the result is shaped by the result annotation
ann[1]; a mode of the operand annotationann[0] keeps the operand’s slicing (ov,lob), every other mode takes that of its rank-1 range innew_mode_ranges(in result mode order). Its cost, one write per result element, is recorded like a product’s.
Scatter
blockinto the[block_lo, block_hi)element slice of the destination’s modemode– the inverse of slice_mode(). Zero-data: updates only the destination’s modelled size and assembled-coverage bookkeeping.ovandcovare the destination’s (mutated in place),lobits lobounds.
-
static inline void record_op_cost(CostModel const &cm, double flops, double exec)¶