[pooma-dev] UserFunction question
Stephen Smith
stephens at proximation.com
Tue Sep 3 15:25:36 UTC 2002
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:cantao at ime.unicamp.br]
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/pooma-dev/attachments/20020903/6e59abc9/attachment.html>
More information about the pooma-dev
mailing list