- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it more efficient to assign via a Do loop:
do i=1,n
x(i)=someotherarray(i,1)
enddo
or
x(1:n)=someotherarray(1:n,1)
or does it matter?
Linda
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Linda
If you are using Win64 and have large arrays you may want to take a quick look at : http://software.intel.com/en-us/forums/showthread.php?t=61077
The last post by Mr. Green indicates that Intel may need do a little bit of further analysis, but based on the response received in Premier Support, I think Intel has pulled the plug on it. (The outer "dead" loop pointed out by Mr. Green is not optimized-out in even in the latest release 11.1.060. But as far as I know this happens only on Win64.)
Also I recall that Steve Lionel had mentioned somewhere to use the whole array syntax instead of specifying the complete partition, if it is possible i.e. avoid A(1:N) = B(1:N) and use A = B if the array size is N. (I interprete this as compiler may think it has to do something extra when the partition is mentioned.)
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tim
Does this mean for rank n with n>1 would have a bigger impact? Can you please illustrate this point with an example? It may be super-elementary but I think it is worth to "put it on the cap"; your advice deeply appreciated.
Sincerely
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page