gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::AMDGPU::mxfp< FMT > Class Template Reference

#include <mxfp.hh>

Public Member Functions

 mxfp ()=default
 
 mxfp (float f)
 
 mxfp (const uint32_t &raw)
 
 mxfp (const mxfp &f)
 
mxfpoperator= (const float &f)
 
mxfpoperator= (const mxfp &f)
 
 operator float () const
 
FMT getFmt () const
 
void setFmt (FMT in)
 
void scale (const float &f)
 

Static Public Member Functions

static constexpr int size ()
 

Public Attributes

uint32_t data = 0
 

Private Member Functions

uint32_t float_to_mxfp (float f)
 
uint32_t float_to_mxfp_nocheck (float f)
 

Private Attributes

mxfpRoundingMode mode = roundTiesToEven
 

Detailed Description

template<typename FMT>
class gem5::AMDGPU::mxfp< FMT >

Definition at line 52 of file mxfp.hh.

Constructor & Destructor Documentation

◆ mxfp() [1/4]

template<typename FMT >
gem5::AMDGPU::mxfp< FMT >::mxfp ( )
default

◆ mxfp() [2/4]

template<typename FMT >
gem5::AMDGPU::mxfp< FMT >::mxfp ( float f)
inline

◆ mxfp() [3/4]

template<typename FMT >
gem5::AMDGPU::mxfp< FMT >::mxfp ( const uint32_t & raw)
inline

Definition at line 62 of file mxfp.hh.

References gem5::AMDGPU::mxfp< FMT >::data.

◆ mxfp() [4/4]

template<typename FMT >
gem5::AMDGPU::mxfp< FMT >::mxfp ( const mxfp< FMT > & f)
inline

Member Function Documentation

◆ float_to_mxfp()

template<typename FMT >
uint32_t gem5::AMDGPU::mxfp< FMT >::float_to_mxfp ( float f)
inlineprivate

◆ float_to_mxfp_nocheck()

template<typename FMT >
uint32_t gem5::AMDGPU::mxfp< FMT >::float_to_mxfp_nocheck ( float f)
inlineprivate

◆ getFmt()

template<typename FMT >
FMT gem5::AMDGPU::mxfp< FMT >::getFmt ( ) const
inline

Definition at line 115 of file mxfp.hh.

References gem5::AMDGPU::mxfp< FMT >::data.

Referenced by gem5::AMDGPU::mxfp< FMT >::scale().

◆ operator float()

template<typename FMT >
gem5::AMDGPU::mxfp< FMT >::operator float ( ) const
inline

◆ operator=() [1/2]

template<typename FMT >
mxfp & gem5::AMDGPU::mxfp< FMT >::operator= ( const float & f)
inline

◆ operator=() [2/2]

template<typename FMT >
mxfp & gem5::AMDGPU::mxfp< FMT >::operator= ( const mxfp< FMT > & f)
inline

◆ scale()

◆ setFmt()

template<typename FMT >
void gem5::AMDGPU::mxfp< FMT >::setFmt ( FMT in)
inline

Definition at line 123 of file mxfp.hh.

References gem5::AMDGPU::mxfp< FMT >::data.

◆ size()

template<typename FMT >
static constexpr int gem5::AMDGPU::mxfp< FMT >::size ( )
inlinestaticconstexpr

Definition at line 105 of file mxfp.hh.

Member Data Documentation

◆ data

◆ mode

template<typename FMT >
mxfpRoundingMode gem5::AMDGPU::mxfp< FMT >::mode = roundTiesToEven
private

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

Generated on Tue Jun 18 2024 16:24:16 for gem5 by doxygen 1.11.0