loki.types.datatypes

Collection of classes to represent type information for symbols used throughout Loki’s internal representation (IR)

Classes

BasicType(value)

Representation of intrinsic data types, names taken from the FORTRAN convention.

DataType()

Base class for data types a symbol may have

class DataType

Bases: object

Base class for data types a symbol may have

class BasicType(value)

Bases: DataType, int, Enum

Representation of intrinsic data types, names taken from the FORTRAN convention.

Currently, there are

and, to indicate an undefined data type (e.g., for imported symbols whose definition is not available), DEFERRED.

For convenience, string representations of FORTRAN and C99 types can be heuristically converted.

DEFERRED = -1
LOGICAL = 1
INTEGER = 2
REAL = 3
CHARACTER = 4
COMPLEX = 5
classmethod from_str(value)

Try to convert the given string using one of the from_* methods.

classmethod from_name(value)

Convert the given string representation of the BasicType.

classmethod from_fortran_type(value)

Convert the given string representation of a FORTRAN type.

classmethod from_c99_type(value)

Convert the given string representation of a C99 type.