Lazy concatenation and padding utilities

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 9 02:01:26 PST 2017


On Thursday, 9 March 2017 at 09:10:47 UTC, Nordlöw wrote:
> On Thursday, 9 March 2017 at 08:59:28 UTC, Ilya Yaroshenko 
> wrote:
>> Ndslice got [1] lazy multidimensional concatenation and 
>> padding utilities:
>
> Nice. Is this dependent on choosing either RC- or GC-based 
> allocation?

... continue prev. reply:

stack and pad* functions are 100% lazy and do not allocate 
anything.
If you have allocated slice of the same shape you can do the 
following:

preallocated_slice[] = stack(a, b, c);

where preallocated_slice was created on top of RC-array using 
`slicedField`.



More information about the Digitalmars-d mailing list