Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Input/output management
Collaboration diagram for Input/output management:

Input/Output for dense array tiles.

#define hit_tileFileWrite(var, file, coord)
 
#define hit_tileFileRead(var, file, coord)
 
#define hit_tileTextFileWrite(var, file, coord, datatype, s1, s2)
 
#define hit_tileTextFileRead(var, file, coord, datatype, s1, s2)
 

Detailed Description

Functionalities to read/write data from/to files.

This module contains functionalities to read/write the data of whole tile variables from/to files. It includes functions for dense array tiles that can bu used to read/write distributed tiles in parallel. For sparse data structures in includes functionalities to read/write tiles in Harwell-Boeing file format.

Macro Definition Documentation

#define hit_tileFileRead (   var,
  file,
  coord 
)

Read the data elements of the array tile from a binary file.

The variable should have been allocated, or it must be a selection of an allocated variable. The ancestor array coordinates should start at 0, and should not have stride.

Parameters
[in,out]varHitTile* A pointer to a HitTile derived type variable.
[in]filechar* Name of the file.
[in]coordFlag for the coordinate system to use.
  • HIT_FILE_TILE The elements are read from the file in row-major order in tile coordinates.
  • HIT_FILE_ARRAY The elements are read from the file in row-major order in array coordinates. If the program is executed in parallel, with a shared file-system or with the same file copied on each file system, and each process has a partition of the array, this option allows to read whole distributed array in parallel.
Return values
intTrue if the variable has assigned memory (allocated, or selection chain of an allocated variable). False otherwise.

Definition at line 974 of file hit_tile.h.

#define hit_tileFileWrite (   var,
  file,
  coord 
)

Write the data elements of the array tile to a binary file.

The variable should have been allocated, or it must be a selection of an allocated variable. The ancestor array coordinates should start at 0, and should not have stride.

The file is completely rewritten. Only the elements in the domain space of the tile are overwritten. The rest of the file positions are not initialized.

Parameters
[in]varHitTile* A pointer to a HitTile derived type variable.
[in]filechar* Name of the file.
[in]coordFlag for the coordinate system to use.
  • HIT_FILE_TILE The elements are written on the file in row-major order in tile coordinates.
  • HIT_FILE_ARRAY The elements are written on the file in row-major order in array coordinates. If the program is executed in parallel, with a shared file-system, and each process has a partition of the array, this option produces a single file with the whole array written in parallel.
Return values
intTrue if the variable has assigned memory (allocated, or selection chain of an allocated variable). False otherwise.

Definition at line 947 of file hit_tile.h.

#define hit_tileTextFileRead (   var,
  file,
  coord,
  datatype,
  s1,
  s2 
)

Read the data elements of the array tile from a text file.

The variable should have been allocated, or it must be a selection of an allocated variable. The ancestor array coordinates should start at 0, and should not have stride.

Parameters
[in]varHitTile* A pointer to a HitTile derived type variable.
[in]filechar* Name of the file.
[in]coordFlag for the coordinate system to use.
  • HIT_FILE_TILE The elements are read from the file in row-major order in tile coordinates.
  • HIT_FILE_ARRAY The elements are read from the file in row-major order in array coordinates. If the program is executed in parallel, with a shared file-system or with the same file copied on each file system, and each process has a partition of the array, this option allows to read whole distributed array in parallel.
[in]datatypeFlag for the type of elements. The following ones are supported:
  • HIT_FILE_INT For int elements.
  • HIT_FILE_LONG For long int elements.
  • HIT_FILE_FLOAT For float elements.
  • HIT_FILE_DOUBLE For double elements.
[in]s1int Width for the format of the numbers
[in]s2int Precision for the format of the numbers (ignored for integers or longs)
Return values
intTrue if the variable has assigned memory (allocated, or selection chain of an allocated variable). False otherwise.

Definition at line 1045 of file hit_tile.h.

#define hit_tileTextFileWrite (   var,
  file,
  coord,
  datatype,
  s1,
  s2 
)

Write the data elements of the array tile to a text file.

The variable should have been allocated, or it must be a selection of an allocated variable. The ancestor array coordinates should start at 0, and should not have stride.

The file is completely rewritten. Only the elements in the domain space of the tile are overwritten. The rest of the file positions are not initialized.

Parameters
[in]varHitTile* A pointer to a HitTile derived type variable.
[in]filechar* Name of the file.
[in]coordFlag for the coordinate system to use.
  • HIT_FILE_TILE The elements are written on the file in row-major order in tile coordinates.
  • HIT_FILE_ARRAY The elements are written on the file in row-major order in array coordinates. If the program is executed in parallel, with a shared file-system, and each process has a partition of the array, this option produces a single file with the whole array written in parallel.
[in]datatypeFlag for the type of elements. The following ones are supported:
  • HIT_FILE_INT For int elements.
  • HIT_FILE_LONG For long int elements.
  • HIT_FILE_FLOAT For float elements.
  • HIT_FILE_DOUBLE For double elements.
[in]s1int Width for the format of the numbers
[in]s2int Precision for the format of the numbers (ignored for integers or longs)
Return values
intTrue if the variable has assigned memory (allocated, or selection chain of an allocated variable). False otherwise.

Definition at line 1011 of file hit_tile.h.