MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Can I speed up a matrix * tensor calculation?


I have a tensor and a matrix. Both pretty large.  Both have real
numbers with machine precision:

    Dimensions[matrix]
    {10000, 5000}

    Dimensions[tensor]
    {5000, 7, 10000}

I need to do the following:

    Total[matrix]* Transpose[tensor {2, 3, 1}]];

but this runs very slowly.  I've thought I needed to transpose the
tensor to multiply it properly.
The result should give me a vector of 5000 elements.

Any suggestions that can speed this up?

Thanks.

J


  • Prev by Date: Graphic3d Plotting of Spheres
  • Next by Date: Re: A Question About Directive [off-topic]
  • Previous by thread: Graphic3d Plotting of Spheres
  • Next by thread: Re: Can I speed up a matrix * tensor calculation?