contiguous uninitialized n-dimensional slice
import mir.ndslice.slice: Slice; auto tensor = stdcUninitAlignedSlice!double([5, 6, 7], 64); assert(tensor.length == 5); assert(tensor.elementCount == 5 * 6 * 7); assert(cast(size_t)(tensor.ptr) % 64 == 0); static assert(is(typeof(tensor) == Slice!(double*, 3))); stdcFreeAlignedSlice(tensor);
Allocates an uninitialized aligned array using core.stdc.stdlib.malloc and creates an n-dimensional slice over it.