freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pooma-dev] UserFunction question


From: Stephen Smith
Subject: RE: [pooma-dev] UserFunction question
Date: Tue, 3 Sep 2002 09:25:36 -0600

Actually, no.  The _expression_ below will be evaluated with a loop:

for(i = ...
  Big2(i) = F.operator()(Big1(i));

UserFunction was create to work within expressions efficiently.
As the other response pointed out, it's more efficient to just
return the result:

      inline InnerType_t& operator( const InnerType_t& t ) const
      {
         return t * t;  
      }

(You can have local data in the functor, but it might not do what
you want in parallel.  If the arrays are multipatch, then each piece
of the _expression_ has its own copy of the user's functor object.)

    Stephen

-----Original Message-----
From: Renato Fernandes Cantão [mailto:address@hidden]
Sent: Monday, September 02, 2002 4:09 PM
To: Pooma Dev List
Subject: [pooma-dev] UserFunction question


   Big2 = F( Big1 );
}

F runs through Big1, applies Operation.operator() in each Big1( i ) --
2D Array's with 10000 elements each -- and finally *copies* the result
to Big2( i ). Correct?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]