Re: BZDEV: Re: Thoughts about stencils

From: Todd Veldhuizen (tveldhui@oonumerics.org)
Date: Thu Jun 25 1998 - 08:06:15 EST


>
> > I could provide another macro to declare stencil operators, e.g.
> >
> > DECLARE_STENCIL_OPERATOR1(Laplacian3D, A)
> > return -6 * A(0,0,0) + A(-1,0,0) + A(1,0,0) + A(0,-1,0)
> > + A(0,1,0) + A(0,0,-1) + A(0,0,1);
> > END_STENCIL_OPERATOR
>
> Why not making your DECLARE_STENCILxxx macros to declare both the
> operator and the actual stencil in terms of the operator (eventually
> in the same class). This would give a uniform and consistent view for
> all the stencils defined this way (which can be used through the
> applystencil mecanism or as operators in other stencil declarations).
> Can this lead to code bloat or inefficiencies ??
> Am I missing something ??

Can you show me how this would look for the above example?

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:05 EST