Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-03-25 21:23:34

Some really good points here...

On Sun, 25 Mar 2001, Doug Gregor wrote:
gregod> How about:
gregod> A[1 <= stride(1) < 2, 2 <= stride(2) <= 8]

Is the comma here invoking operator, ?

gregod> Specifying intervals using function notation is
gregod> unfortunate in C++ because the use of parentheses or
gregod> brackets doesn't match the mathematical notation. The
gregod> range (a, b) expressed mathematically is unambiguous, but
gregod> if we have a C++ functoin call interval(a, b) the user
gregod> will always be sent back to the documentation to figure
gregod> out what happens at the endpoints. Using relational
gregod> operators it is unambiguous.


gregod> While I'm throwing out random syntax, an interface between
gregod> the lambda library and the multidim array/matrix/linear
gregod> algebra library could allow for some really nice code:
gregod> // A is M x N, B is N x R
gregod> indexer<int> i, j, k;
gregod> C[i, j] = sum(A[i, k] * B[k, j], for_all(0 <= k < N)),
gregod> for_all(0 <= i < M, 0 <= j < R);
gregod> And for a really neat trick, have the library tile this loop nest :)

That would be very cool...

 Jeremy Siek www:
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906

Boost list run by bdawes at, gregod at, cpdaniel at, john at