clang  8.0.0
Public Member Functions | List of all members
clang::FixedPointSemantics Class Reference

The fixed point semantics work similarly to llvm::fltSemantics. More...

#include "clang/Basic/FixedPoint.h"

Public Member Functions

 FixedPointSemantics (unsigned Width, unsigned Scale, bool IsSigned, bool IsSaturated, bool HasUnsignedPadding)
 
unsigned getWidth () const
 
unsigned getScale () const
 
bool isSigned () const
 
bool isSaturated () const
 
bool hasUnsignedPadding () const
 
void setSaturated (bool Saturated)
 
unsigned getIntegralBits () const
 

Detailed Description

The fixed point semantics work similarly to llvm::fltSemantics.

The width specifies the whole bit width of the underlying scaled integer (with padding if any). The scale represents the number of fractional bits in this type. When HasUnsignedPadding is true and this type is signed, the first bit in the value this represents is treaded as padding.

Definition at line 32 of file FixedPoint.h.

Constructor & Destructor Documentation

◆ FixedPointSemantics()

clang::FixedPointSemantics::FixedPointSemantics ( unsigned  Width,
unsigned  Scale,
bool  IsSigned,
bool  IsSaturated,
bool  HasUnsignedPadding 
)
inline

Definition at line 34 of file FixedPoint.h.

Member Function Documentation

◆ getIntegralBits()

unsigned clang::FixedPointSemantics::getIntegralBits ( ) const
inline

Definition at line 49 of file FixedPoint.h.

Referenced by clang::APFixedPoint::convert().

◆ getScale()

unsigned clang::FixedPointSemantics::getScale ( ) const
inline

Definition at line 42 of file FixedPoint.h.

Referenced by clang::APFixedPoint::convert(), and clang::APFixedPoint::getIntPart().

◆ getWidth()

unsigned clang::FixedPointSemantics::getWidth ( ) const
inline

◆ hasUnsignedPadding()

bool clang::FixedPointSemantics::hasUnsignedPadding ( ) const
inline

Definition at line 45 of file FixedPoint.h.

Referenced by clang::APFixedPoint::getMax().

◆ isSaturated()

bool clang::FixedPointSemantics::isSaturated ( ) const
inline

Definition at line 44 of file FixedPoint.h.

Referenced by clang::APFixedPoint::convert().

◆ isSigned()

bool clang::FixedPointSemantics::isSigned ( ) const
inline

◆ setSaturated()

void clang::FixedPointSemantics::setSaturated ( bool  Saturated)
inline

Definition at line 47 of file FixedPoint.h.


The documentation for this class was generated from the following file: