Dear All,
Recently I've switched to F90 from C++, so please excuse me this kind
of question ;-).
In C++ there are some problems witch temporary objects.
For example consider evaluation of expression
D = A + B + C
where A,B,C,D are objects of Vector class.
Because overload operators in C++ are evaluated in pairwise manner,
in a straightforward implementation of class Vector two temporary
objects will be created and three loops generated.
In some circumstances cost of allocating temporaries can be very high.
There exist special techniques (template expression, template metaprograms)
to solve this and related problems.
My question is how this problem is solved in Fortran90 ?
Regards
Roman
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|