easier way?

bearophile bearophileHUGS at lycos.com
Thu Aug 26 15:27:37 PDT 2010


Philippe Sigaud:
> But in the same way that you cannot always convert T[] into T[3], how could
> you convert a Tensor!(int,2) (2D, runtime dims) into a Matrix!(int,4,4)?
> (2D, CT dim: 4*4)

The conversion functions are written by you, so you can all things you want (with just few runtime tests). If they are both on the heap you may even avoid copying data.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list