The GILDAS software is designed to work in an heterogeneous network, where each computer may have its own floating point and integer number representation and its own operating system. Images created on any computer should be accessible transparently from any other computer in the network.
To allow such a portability and yet preserve efficiency when working on a single type of machines, all files are written in the binary representation of the machine on which they were created. A library of subroutines is used to access the images and perform the necessary format conversion between the different representations of real and integer numbers. So far, 3 representations are recognised: VAX format, IEEE format (DEC DS Workstation) and EEEI format (Sun SparcStation, IBM RS-6000 series, etc...).
The images have the following organisation :
The header starts with 'GILDAS', followed by one character which indicates the type of integer and floating point number representation
On computers which support such possibilities (VMS systems), GILDAS makes extensive use of memory mapping to access the images : instead of being read into memory through standard I/O techniques, the disk file containing an image is directly made part of the virtual memory accessed by the program, through the use of the appropriate system routines. Physical I/O between this virtual memory and the physical memory is then later handled by the system memory management.
On other computers, the image is copied into memory using standard FORTRAN direct I/O. Provided adequate programmation by the application programmer, only the necessary part of the image is read or mapped. This is a totally transparent process for the application programmer, who will always consider the image as a FORTRAN array in virtual memory.
The portable version of the GILDAS software makes the distinction between an image and the "incarnation" of an image subset in memory. Each image has an associated "Image Slot" (IS), while each memory part has an associated "Memory Slot" (MS). Several memory slots may corresponds to several "windows" into a single image slot.