The OpenD Programming Language

assumeSameShape

Helps the compiler to use optimisations related to the shape form

void
assumeSameShape
(
T...
)
(
ref scope T slices
)

Examples

auto a = iota(5, 5);
auto b = iota(5, 5);

assumeHypercube(a); // first use this one, if applicable
assumeSameShape(a, b); //

assert(a == iota(5, 5));
assert(b == iota(5, 5));

Meta