- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
will an allocation statement produce contiguous memory? If not, is this something controllable?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it will be contigous
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Be aware of Fortran's array indexing:
ALLOCATE(array(100,100))
...
value = array(I,J)
The next location in array's memory is array(I+1,J).
IOW the left most index is stride-1, the second (from left) index is stride-size(left most index).
This indexing order is reverse of what you find in C/C++.
Jim Dempsey

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