FLANG
MathOptionsBase.h File Reference
#include "MathOptionsBase.def"

Go to the source code of this file.

Classes

class  Fortran::common::MathOptionsBase

Namespaces

namespace  Fortran
namespace  Fortran::common

Macros

#define ENUM_MATHOPT(Name, Type, Bits, Default)
#define ENUM_MATHOPT(Name, Type, Bits, Default)
#define ENUM_MATHOPT(Name, Type, Bits, Default)

Detailed Description

Options controlling mathematical computations generated in FIR. This is intended to be header-only implementation without extra dependencies so that multiple components can use it to exchange math configuration.

Macro Definition Documentation

◆ ENUM_MATHOPT [1/3]

#define ENUM_MATHOPT ( Name,
Type,
Bits,
Default )
Value:
Type get##Name() const { return static_cast<Type>(Name); } \
MathOptionsBase &set##Name(Type Value) { \
Name = static_cast<unsigned>(Value); \
return *this; \
}

◆ ENUM_MATHOPT [2/3]

#define ENUM_MATHOPT ( Name,
Type,
Bits,
Default )
Value:
set##Name(Default);

◆ ENUM_MATHOPT [3/3]

#define ENUM_MATHOPT ( Name,
Type,
Bits,
Default )
Value:
unsigned Name : Bits;