|
| const Def * | mim::plug::btensor::op_affine_map (const Def *f, const Def *m, const Def *n, const Def *s_in, const Def *s_out, const Def *idxs, const Def *mem) |
| | affine.map @(m, n) @(s_in, s_out) f idxs as mem with the address space as of mem ↦ [mem', coords].
|
| void | mim::plug::btensor::app_cps (Lam *caller, const Def *f, DefVec args, const Def *ret) |
| | Calls the combiner/epilogue f from caller with args and the continuation ret.
|
| std::pair< Lam *, const Def * > | mim::plug::btensor::ds_splice (const Def *arg, const Def *codom, std::string name) |
| | A fresh fun: Fn arg->type() → codom named name, spliced into direct style as cps.cps2ds_dep fun arg.
|
| DefVec | mim::plug::btensor::to_idxs (World &w, Defs extents, Defs iters) |
| | Converts the raw i64 loop counters iters into indices Idx extents[d].
|
| const Def * | mim::plug::btensor::folded_idx (const Def *shape, Defs iters) |
| | The raw i64 loop counters iters as a buffer index into shape, with its literal size-1 axes folded away.
|
| const Def * | mim::plug::btensor::clamp (const Def *x, const Def *hi) |
| | Clamps the i64 x into [0, hi].
|
| std::pair< DefVec, const Def * > | mim::plug::btensor::pad_coords (Defs iters, const Def *lo, const Def *s_in, bool replicate) |
| | The read coordinates o#d − lo#d of a pad into Idx s_in#d - clamped to the nearest edge if replicate, or else zeroed out of range - together with the all-axes in-range flag (nullptr if replicate).
|
| std::optional< fe::Vector< u64 > > | mim::plug::btensor::concat_extents (const Def *Sis, u64 nis, u64 r, u64 ax) |
| | The literal extents of the nis input shapes Sis along the concat axis ax; std::nullopt if one is not literal.
|
| const Def * | mim::plug::btensor::concat_select (const Def *o_ax, const fe::Vector< u64 > &exts, auto read) |
| | The concat cell at the i64 axis coordinate o_ax: read(i, loc) of the input i owning it - the highest one whose prefix offset is ≤ o_ax - at the axis coordinate loc clamped into that input.
|
| const Def * | mim::plug::btensor::build_pointwise (const Def *result_ty, const Def *mem, const Def *dst, const Def *ins, const Def *s_out, u64 rn, const std::string &name, auto compute) |
| | A [mem, dst, ins] → [mem, Buf] fun spliced via cps.cps2ds_dep that loops over s_out carrying [mem, dst] and writes compute's element at the loop's (identity) output coordinates.
|