Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-04-03 00:24:53


On Mon, 2 Apr 2001, Larry Evans wrote:
jcampb>
jcampb> One example of subarray slicing is the recursive strassen[1] matrix multiplication.
jcampb> However, I've also heard that this is NOT used in practice because it's slow
jcampb> (I guess because of the recursion).

There have been a few cases where people have used strassen. At one point
Cray used it in there implementation the BLAS gdemm to get a better
linpack benchmark result. One trouble with strassen is that it is only
better than the usual algorithm when the matrices get large. The typical
approach is to do strassen-style recursion until the submatrices are small
enough, and then use the normal algorithm.

jcampb> I'm unsure what indirect slicing is. Is it the use of an vector of indices to create
jcampb> a subarray, as in the following?
jcampb>
jcampb> int indices0[] = {1,5,6,10};
jcampb> int indices1[] = {5,4,6};
jcampb> int xshape[] = {10,6};
jcampb> array<double,2> x(xshape);
jcampb> int yshape[] = {4,3};
jcampb> array<double,2> y(yshape);
jcampb> y = x[indices0][indices1];

Yep, that's it. Also, see the example in the multi_array docs Ron and I
are working on:

http://www.lsc.nd.edu/~jsiek/tlc/multi_array/libs/numeric/doc/multi_array.html

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk