My Project
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::FloatAttr Class Reference

#include <Attributes.h>

Inheritance diagram for mlir::FloatAttr:
Inheritance graph
[legend]
Collaboration diagram for mlir::FloatAttr:
Collaboration graph
[legend]

Public Types

using ValueType = APFloat
 
- Public Types inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
using Base = StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
 Utility declarations for the concrete attribute class. More...
 
using ImplType = StorageT
 

Public Member Functions

APFloat getValue () const
 
double getValueAsDouble () const
 

Static Public Member Functions

static FloatAttr get (Type type, double value)
 
static FloatAttr getChecked (Type type, double value, Location loc)
 
static FloatAttr get (Type type, const APFloat &value)
 Return a float attribute for the specified value in the specified type. More...
 
static FloatAttr getChecked (Type type, const APFloat &value, Location loc)
 
static double getValueAsDouble (APFloat val)
 
static bool kindof (unsigned kind)
 Methods for support type inquiry through isa, cast, and dyn_cast. More...
 
static LogicalResult verifyConstructionInvariants (Optional< Location > loc, MLIRContext *ctx, Type type, double value)
 Verify the construction invariants for a double value. More...
 
static LogicalResult verifyConstructionInvariants (Optional< Location > loc, MLIRContext *ctx, Type type, const APFloat &value)
 
- Static Public Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
static ClassIDgetClassID ()
 Return a unique identifier for the concrete type. More...
 
template<typename T >
static bool classof (T val)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
ImplTypegetImpl () const
 Utility for easy access to the storage instance. More...
 
- Static Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
template<typename... Args>
static ConcreteT get (MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static ConcreteT getChecked (const Location &loc, MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static LogicalResult verifyConstructionInvariants (Args... args)
 Default implementation that just returns success. More...
 

Member Typedef Documentation

◆ ValueType

using mlir::FloatAttr::ValueType = APFloat

Member Function Documentation

◆ get() [1/2]

FloatAttr FloatAttr::get ( Type  type,
double  value 
)
static

Return a float attribute for the specified value in the specified type. These methods should only be used for simple constant values, e.g 1.0/2.0, that are known-valid both as host double and the 'type' format.

◆ get() [2/2]

FloatAttr FloatAttr::get ( Type  type,
const APFloat &  value 
)
static

Return a float attribute for the specified value in the specified type.

◆ getChecked() [1/2]

FloatAttr FloatAttr::getChecked ( Type  type,
double  value,
Location  loc 
)
static

◆ getChecked() [2/2]

FloatAttr FloatAttr::getChecked ( Type  type,
const APFloat &  value,
Location  loc 
)
static

◆ getValue()

APFloat FloatAttr::getValue ( ) const

◆ getValueAsDouble() [1/2]

double FloatAttr::getValueAsDouble ( ) const

This function is used to convert the value to a double, even if it loses precision.

◆ getValueAsDouble() [2/2]

double FloatAttr::getValueAsDouble ( APFloat  val)
static

◆ kindof()

static bool mlir::FloatAttr::kindof ( unsigned  kind)
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast.

◆ verifyConstructionInvariants() [1/2]

LogicalResult FloatAttr::verifyConstructionInvariants ( Optional< Location loc,
MLIRContext ctx,
Type  type,
double  value 
)
static

Verify the construction invariants for a double value.

◆ verifyConstructionInvariants() [2/2]

LogicalResult FloatAttr::verifyConstructionInvariants ( Optional< Location loc,
MLIRContext ctx,
Type  type,
const APFloat &  value 
)
static

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