LLVM  13.0.0git
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
llvm::LinearPolyBase< LeafTy > Class Template Reference

LinearPolyBase describes a linear polynomial: c0 * scale0 + c1 * scale1 + ... More...

#include "llvm/Support/TypeSize.h"

Inheritance diagram for llvm::LinearPolyBase< LeafTy >:
Inheritance graph
[legend]
Collaboration diagram for llvm::LinearPolyBase< LeafTy >:
Collaboration graph
[legend]

Public Types

using ScalarTy = typename LinearPolyBaseTypeTraits< LeafTy >::ScalarTy
 

Public Member Functions

bool operator== (const LinearPolyBase &RHS) const
 
bool operator!= (const LinearPolyBase &RHS) const
 
bool isZero () const
 
bool isNonZero () const
 
 operator bool () const
 
ScalarTy getValue (unsigned Dim) const
 

Static Public Attributes

static constexpr auto Dimensions = LinearPolyBaseTypeTraits<LeafTy>::Dimensions
 

Protected Member Functions

 LinearPolyBase (ArrayRef< ScalarTy > Values)
 

Friends

LeafTy & operator+= (LeafTy &LHS, const LeafTy &RHS)
 
LeafTy & operator-= (LeafTy &LHS, const LeafTy &RHS)
 
LeafTy & operator*= (LeafTy &LHS, ScalarTy RHS)
 
LeafTy operator+ (const LeafTy &LHS, const LeafTy &RHS)
 
LeafTy operator- (const LeafTy &LHS, const LeafTy &RHS)
 
LeafTy operator* (const LeafTy &LHS, ScalarTy RHS)
 
template<typename U = ScalarTy>
std::enable_if_t< std::is_signed< U >::value, LeafTy > operator- (const LeafTy &LHS)
 

Detailed Description

template<typename LeafTy>
class llvm::LinearPolyBase< LeafTy >

LinearPolyBase describes a linear polynomial: c0 * scale0 + c1 * scale1 + ...

Definition at line 46 of file TypeSize.h.

Member Typedef Documentation

◆ ScalarTy

template<typename LeafTy >
using llvm::LinearPolyBase< LeafTy >::ScalarTy = typename LinearPolyBaseTypeTraits<LeafTy>::ScalarTy

Definition at line 48 of file TypeSize.h.

Constructor & Destructor Documentation

◆ LinearPolyBase()

template<typename LeafTy >
llvm::LinearPolyBase< LeafTy >::LinearPolyBase ( ArrayRef< ScalarTy Values)
inlineprotected

Definition at line 57 of file TypeSize.h.

Member Function Documentation

◆ getValue()

template<typename LeafTy >
ScalarTy llvm::LinearPolyBase< LeafTy >::getValue ( unsigned  Dim) const
inline

Definition at line 117 of file TypeSize.h.

◆ isNonZero()

template<typename LeafTy >
bool llvm::LinearPolyBase< LeafTy >::isNonZero ( ) const
inline

Definition at line 114 of file TypeSize.h.

Referenced by llvm::LinearPolyBase< StackOffset >::operator bool().

◆ isZero()

template<typename LeafTy >
bool llvm::LinearPolyBase< LeafTy >::isZero ( ) const
inline

Definition at line 111 of file TypeSize.h.

Referenced by llvm::LinearPolyBase< StackOffset >::isNonZero().

◆ operator bool()

template<typename LeafTy >
llvm::LinearPolyBase< LeafTy >::operator bool ( ) const
inlineexplicit

Definition at line 115 of file TypeSize.h.

◆ operator!=()

template<typename LeafTy >
bool llvm::LinearPolyBase< LeafTy >::operator!= ( const LinearPolyBase< LeafTy > &  RHS) const
inline

Definition at line 107 of file TypeSize.h.

◆ operator==()

template<typename LeafTy >
bool llvm::LinearPolyBase< LeafTy >::operator== ( const LinearPolyBase< LeafTy > &  RHS) const
inline

Definition at line 102 of file TypeSize.h.

Friends And Related Function Documentation

◆ operator*

template<typename LeafTy >
LeafTy operator* ( const LeafTy &  LHS,
ScalarTy  RHS 
)
friend

Definition at line 90 of file TypeSize.h.

◆ operator*=

template<typename LeafTy >
LeafTy& operator*= ( LeafTy &  LHS,
ScalarTy  RHS 
)
friend

Definition at line 74 of file TypeSize.h.

◆ operator+

template<typename LeafTy >
LeafTy operator+ ( const LeafTy &  LHS,
const LeafTy &  RHS 
)
friend

Definition at line 80 of file TypeSize.h.

◆ operator+=

template<typename LeafTy >
LeafTy& operator+= ( LeafTy &  LHS,
const LeafTy &  RHS 
)
friend

Definition at line 62 of file TypeSize.h.

◆ operator- [1/2]

template<typename LeafTy >
template<typename U = ScalarTy>
std::enable_if_t<std::is_signed<U>::value, LeafTy> operator- ( const LeafTy &  LHS)
friend

Definition at line 97 of file TypeSize.h.

◆ operator- [2/2]

template<typename LeafTy >
LeafTy operator- ( const LeafTy &  LHS,
const LeafTy &  RHS 
)
friend

Definition at line 85 of file TypeSize.h.

◆ operator-=

template<typename LeafTy >
LeafTy& operator-= ( LeafTy &  LHS,
const LeafTy &  RHS 
)
friend

Definition at line 68 of file TypeSize.h.

Member Data Documentation

◆ Dimensions

template<typename LeafTy >
constexpr auto llvm::LinearPolyBase< LeafTy >::Dimensions = LinearPolyBaseTypeTraits<LeafTy>::Dimensions
staticconstexpr

Definition at line 49 of file TypeSize.h.


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