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

UnivariateLinearPolyBase is a base class for ElementCount and TypeSize. More...

#include "llvm/Support/TypeSize.h"

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

Public Types

using ScalarTy = typename LinearPolyBaseTypeTraits< LeafTy >::ScalarTy
 

Public Member Functions

bool operator== (const UnivariateLinearPolyBase &RHS) const
 
bool operator!= (const UnivariateLinearPolyBase &RHS) const
 
bool isZero () const
 
bool isNonZero () const
 
 operator bool () const
 
ScalarTy getValue () const
 
ScalarTy getValue (unsigned Dim) const
 
LeafTy getWithIncrement (ScalarTy RHS) const
 Add RHS to the value at the univariate dimension. More...
 
LeafTy getWithDecrement (ScalarTy RHS) const
 Subtract RHS from the value at the univariate dimension. More...
 

Static Public Attributes

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

Protected Member Functions

 UnivariateLinearPolyBase (ScalarTy Val, unsigned UnivariateDim)
 

Protected Attributes

ScalarTy Value
 
unsigned UnivariateDim
 

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< std::is_signed< U >::value, LeafTy >::type operator- (const LeafTy &LHS)
 

Detailed Description

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

UnivariateLinearPolyBase is a base class for ElementCount and TypeSize.

Like LinearPolyBase it tries to represent a linear polynomial where only one dimension can be set at any time, e.g. 0 * scale0 + 0 * scale1 + ... + cJ * scaleJ + ... + 0 * scaleK The dimension that is set is the univariate dimension.

Definition at line 165 of file TypeSize.h.

Member Typedef Documentation

◆ ScalarTy

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

Definition at line 167 of file TypeSize.h.

Constructor & Destructor Documentation

◆ UnivariateLinearPolyBase()

template<typename LeafTy >
llvm::UnivariateLinearPolyBase< LeafTy >::UnivariateLinearPolyBase ( ScalarTy  Val,
unsigned  UnivariateDim 
)
inlineprotected

Member Function Documentation

◆ getValue() [1/2]

template<typename LeafTy >
ScalarTy llvm::UnivariateLinearPolyBase< LeafTy >::getValue ( ) const
inline

◆ getValue() [2/2]

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

Definition at line 233 of file TypeSize.h.

◆ getWithDecrement()

template<typename LeafTy >
LeafTy llvm::UnivariateLinearPolyBase< LeafTy >::getWithDecrement ( ScalarTy  RHS) const
inline

Subtract RHS from the value at the univariate dimension.

Definition at line 244 of file TypeSize.h.

◆ getWithIncrement()

template<typename LeafTy >
LeafTy llvm::UnivariateLinearPolyBase< LeafTy >::getWithIncrement ( ScalarTy  RHS) const
inline

Add RHS to the value at the univariate dimension.

Definition at line 238 of file TypeSize.h.

Referenced by llvm::LoopVectorizationPlanner::buildVPlans().

◆ isNonZero()

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

◆ isZero()

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

◆ operator bool()

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

Definition at line 231 of file TypeSize.h.

◆ operator!=()

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

Definition at line 225 of file TypeSize.h.

◆ operator==()

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

Definition at line 221 of file TypeSize.h.

Friends And Related Function Documentation

◆ operator*

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

Definition at line 208 of file TypeSize.h.

◆ operator*=

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

Definition at line 193 of file TypeSize.h.

◆ operator+

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

Definition at line 198 of file TypeSize.h.

◆ operator+=

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

Definition at line 181 of file TypeSize.h.

◆ operator- [1/2]

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

Definition at line 215 of file TypeSize.h.

◆ operator- [2/2]

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

Definition at line 203 of file TypeSize.h.

◆ operator-=

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

Definition at line 187 of file TypeSize.h.

Member Data Documentation

◆ Dimensions

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

◆ UnivariateDim

template<typename LeafTy >
unsigned llvm::UnivariateLinearPolyBase< LeafTy >::UnivariateDim
protected

◆ Value

template<typename LeafTy >
ScalarTy llvm::UnivariateLinearPolyBase< LeafTy >::Value
protected

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