Overview

(See also Numeric Type Constants)

Since BRAHMS processes must communicate data to one another, fixed-width numeric types are explicitly defined in the Component Interface to avoid compiler ambiguities as to the storage width of types built-in to C. Internally to components, i.e. where no other part of BRAHMS will interface, a developer may of course do as they wish, and use the C built-in types if desired. However, adherence to the scheme is strongly encouraged even here since it maximizes readability if someone wishes to modify your code whilst ensuring that you are protected against compiler/platform variations of which you may not be aware at time of writing.

Numeric Type Constants are also provided to allow components to communicate data formats between themselves. In addition, some BRAHMS-specific numeric data types are provided; these are listed below.

Notes
  • The standard numeric types provided by stdint.h (cstdint), where available, underlie the BRAHMS standard Numeric Types. Hence, the two sets are entirely equivalent and compatible, and you can use whichever you like. The BRAHMS Numeric Types, however, use the same notation as the BRAHMS Numeric Type Constants, which is nice.

Primitive Numeric Types

The standard numeric formats are INT, UINT, CHAR, BOOL, and FLOAT, and come in bit-widths of 8, 16, 32, and 64, to form the standard numeric types (which specify format and bit-width), as follows.

Standard

FLOAT32
FLOAT64
INT8
INT16
INT32
INT64
UINT8
UINT16
UINT32
UINT64
BOOL8
BOOL16
BOOL32
BOOL64
CHAR8
CHAR16
CHAR32
CHAR64

Architecture-specific

INTA and UINTA have the bit-width of the architecture on which you are compiling.

INTA
UINTA

Synonyms

DOUBLE
FLOAT64
SINGLE
FLOAT32
BYTE
UINT8
Notes
  • Two possible types are not implemented, FLOAT8 and FLOAT16, since there is no specification for their storage format (as far as I know).
  • BOOL and CHAR are implemented as UINT, but their values are interpreted appropriately (i.e. they have different semantics, though they are stored identically).