Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-03-25 22:01:45


And here's another crazy thought....

How about we combine the range class used here (with the comparison
operators) with the integer range class that we've been thinking of
building on top of counting_iterator. Actually, it will need to be
counting_iterator adapted with strided_iterator, but that's ok since I
implemented strided_iterator the other night.

On Sun, 25 Mar 2001, David Abrahams wrote:

abraha> Wow, this looks pretty sweet to me!
abraha> -Dave
abraha> ----- Original Message -----
abraha> From: "Doug Gregor" <gregod_at_[hidden]>
abraha> > How about:
abraha> >
abraha> > A[1 <= stride(1) < 2, 2 <= stride(2) <= 8]
abraha> >
abraha> > Specifying intervals using function notation is unfortunate in C++ because
abraha> > the use of parentheses or brackets doesn't match the mathematical
abraha> notation.
abraha> > The range (a, b) expressed mathematically is unambiguous, but if we have a
abraha> > C++ functoin call interval(a, b) the user will always be sent back to the
abraha> > documentation to figure out what happens at the endpoints. Using
abraha> relational
abraha> > operators it is unambiguous.
abraha> >
abraha> > While I'm throwing out random syntax, an interface between the lambda
abraha> library
abraha> > and the multidim array/matrix/linear algebra library could allow for some
abraha> > really nice code:
abraha> >
abraha> > // A is M x N, B is N x R
abraha> > indexer<int> i, j, k;
abraha> > C[i, j] = sum(A[i, k] * B[k, j], for_all(0 <= k < N)),
abraha> > for_all(0 <= i < M, 0 <= j < R);
abraha> >
abraha> > And for a really neat trick, have the library tile this loop nest :)
abraha> >
abraha> > Doug
abraha> >
abraha>
abraha>
abraha> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
abraha>
abraha>
abraha> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
abraha>
abraha>
abraha>

----------------------------------------------------------------------
 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