easier way?

Philippe Sigaud philippe.sigaud at gmail.com
Thu Aug 26 15:16:13 PDT 2010


On Thu, Aug 26, 2010 at 22:41, bearophile <bearophileHUGS at lycos.com> wrote:

> Philippe Sigaud:
> > What you lose is the CT checking that can be done for multiplication or
> > additions if all dimensions are exposed in the type.
>
> If you want, you may create a second nD array struct where sizes too are CT
> values, plus two methods/free functions to convert between the two array
> types.
>
>
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)


Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100827/d67d3ee7/attachment.html>


More information about the Digitalmars-d-learn mailing list