next up previous
Next: Mapping and Unmapping
Up: ACCESSING ARRAY COMPONENTS
Previous: ACCESSING ARRAY COMPONENTS

Overview of Mapped Access to Array Components  

The NDF_ system provides access to the values in an NDF's array components by means of a technique known as mapping. In this, an array is created in a region of the computer's memory and a pointer to it is returned to the calling routine. Access to a selected NDF array component then takes place by means of the application reading and writing values to and from this array. For instance, if the component's values are to be read, then the array would be filled with the requested values, which the application can then access.

The array of values stored in memory is usually made to appear to an application as if it were a normal Fortran array (with an appropriate numeric type and shape) so that the NDF component's values may be accessed merely by referring to this mapped array in the normal Fortran way. If appropriate, modifications may also be made to the values in the array and these will be returned to the appropriate NDF component, updating it, when it is unmapped - a process which completes the transfer of values. At this point, the allocated memory is released and no further reference to the mapped values can be made unless the array is mapped again.



next up previous
Next: Mapping and Unmapping
Up: ACCESSING ARRAY COMPONENTS
Previous: ACCESSING ARRAY COMPONENTS


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils