Alex, (as we usually call our Prince Willem Alexander)
At 21:36 18-09-2000 -0400, you wrote:
>Alberto Fasso' wrote:
>
>> My solution:
>> declare an array y of dimension 1000, fill all its elements
>> with the same value x, and write:
>>
>> CALL SYSTEM_CLOCK(CLOCK=c1)
! ^^^^^^^^^^
I don't remember who was the first to ask about this program.
But obviously it is not a real one as CLOCK is not an allowed keyword of
SYSTEM_CLOCK :-)
>> DO k=1,1000...
>> erf=Erf(y(k))
! and ^^^^^ won't work either.. unless ERF is an array.
>> END DO
>> CALL SYSTEM_CLOCK(CLOCK=c2)
>> counts=c2-c1
>>
>> Do you think that the compiler would be smart enough to see
>> that all elements are identical?
>
>I would be extremely (pleasantly, of course) to see a compiler see through
>that.
>
>The only problem with the approach above is that it incurs an additional data
>motion in writing-reading to a large array which for fast Erf routine may be
>significant, especially with todays extra fast processors and slow memory
>busses.
>One approach is to try to trick the compiler by giving it a false interface
>that declares x as INTENT(IN OUT). This doesn't seem lik a very nice solution
>either...
--
Meilleures Salutations,
Kindest Regards,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays-Bas
mailto:[log in to unmask]
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|