![]() |
Blitz Support : |
From: Julian C. Cummings (cummings_at_[hidden])
Date: 2003-12-08 14:05:26
Navneet,
I'm in the midst of some fixups of some the Array stencil code, so I will
try to incorporate your code for support trinary operators as well.
Regards, Julian C.
Dr. Julian C. Cummings
Staff Scientist, CACR/Caltech
(626) 395-2543
cummings_at_[hidden]
> -----Original Message-----
> From: blitz-support-bounces_at_[hidden]
> [mailto:blitz-support-bounces_at_[hidden]] On Behalf Of
> Navneet Dalal
> Sent: Monday, December 08, 2003 10:35 AM
> To: Support list for Blitz++
> Subject: Re: [Blitz-support] trinary functions
>
>
>
> On Mon, 08 Dec 2003 15:47:30 +0200, Andrius Kurtinaitis
> <andrius.kurtinaitis_at_[hidden]> wrote:
>
> > Hello,
> >
> > I would like to define a function which could be used in an array
> > expression and which takes three array expression
> arguments. I found
> > macros which allow to define one- or two-argument
> functions, but not
> > three... Is it very dificult to make a trinary function?
>
> I too remember that once I needed a ternary operator. But at
> that time, I
> was new to blitz and could not do it.
>
> However, I just have been able to write ternary support
> classes for blitz.
> The sample code is attached.
> However, this code is written with assumption that your
> compiler supports
> templates arguments in template parameters.
> Look for
>
> #define BZ_TEMPLATES_AS_TEMPLATE_ARGUMENTS
>
> in blitz/config.h
> If it is defined, it should work.
>
> Also, since I have just written it, so I am not able to test it quite
> well. Just let me know if there are any problems.
>
> > Is it possible to call applyStencil with array expressions as
> > arguments?
>
> applyStencil takes upto 11 arguments. Why donot you pass your
> individual
> arrays to applyStencil and evalulate the expression
> in stencil code?
>
> -navneet
> PS: Julian, may be you add this code to blitz? The code is
> pretty straight
> forward. Just extended Binary Expression classes for ternary
> operators.
>