The OpenD Programming Language

fuseCells

Fuses cells into GC-allocated ndslice.

fuseCells
(
S
)
()

Parameters

cells S

ndrange of ndcells, ndrange and ndcell should have shape and multidimensional input range primivies (front!d, empty!d, popFront!d).

Return Value

Type: auto

ndslice composed of fused cells.

Examples

1D

import mir.ndslice.topology: iota;
enum ar = [[0, 1], [], [2, 3, 4, 5], [6], [7, 8, 9]];
static assert ([[0, 1], [], [2, 3, 4, 5], [6], [7, 8, 9]].fuseCells == 10.iota);
assert (ar.fuseCells == 10.iota);

2D

import mir.ndslice.topology: iota;
import mir.ndslice.chunks;

auto sl = iota(11, 17);
assert(sl.chunks!(0, 1)(3, 4).fuseCells == sl);

See Also

Meta