Re: BZDEV: Indirection

From: Todd Veldhuizen (tveldhui@oonumerics.org)
Date: Fri Jul 31 1998 - 08:31:14 EST


Another point about indirection I forgot to mention: although
not yet implemented, you will be able to use lists of
RectDomain<N> objects (i.e. rectangular subdomains).
This will make it easier and more efficient to work with
arbitrarily-shaped subarrays.

For example:

    [ 0 0 0 0 0 0 0 0 0 1 1 0 0 ]
    [ 0 1 1 1 0 0 0 0 1 1 1 1 0 ]
A = [ 0 1 1 1 1 1 0 1 1 1 1 1 0 ]
    [ 1 1 1 1 1 1 1 1 1 1 0 0 0 ]
    [ 0 0 0 1 1 0 0 0 0 0 0 0 0 ]

list<RectDomain<2> > blob;
// insert a series of RectDomain<N> objects into blob
// which represents the above shape
A[blob] = 5;

I think this mechanism could also be used for red/black,
if RectDomain<N> is extended to include strided rectangular
subdomains. Example:

A[red] = myStencil(A);
A[black] = myStencil(A);

where myStencil is some stencil operator.

Cheers,
Todd
--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: mail to majordomo@oonumerics.org, with
"subscribe blitz-dev" or "unsubscribe blitz-dev" in the body of the message
* Blitz++ web page: http://oonumerics.org/blitz/



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:06 EST