LLVM 20.0.0git
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
llvm::IntervalMapImpl::NodeBase< T1, T2, N > Class Template Reference

#include "llvm/ADT/IntervalMap.h"

Inheritance diagram for llvm::IntervalMapImpl::NodeBase< T1, T2, N >:
Inheritance graph
[legend]

Public Member Functions

template<unsigned M>
void copy (const NodeBase< T1, T2, M > &Other, unsigned i, unsigned j, unsigned Count)
 copy - Copy elements from another node.
 
void moveLeft (unsigned i, unsigned j, unsigned Count)
 moveLeft - Move elements to the left.
 
void moveRight (unsigned i, unsigned j, unsigned Count)
 moveRight - Move elements to the right.
 
void erase (unsigned i, unsigned j, unsigned Size)
 erase - Erase elements [i;j).
 
void erase (unsigned i, unsigned Size)
 erase - Erase element at i.
 
void shift (unsigned i, unsigned Size)
 shift - Shift elements [i;size) 1 position to the right.
 
void transferToLeftSib (unsigned Size, NodeBase &Sib, unsigned SSize, unsigned Count)
 transferToLeftSib - Transfer elements to a left sibling node.
 
void transferToRightSib (unsigned Size, NodeBase &Sib, unsigned SSize, unsigned Count)
 transferToRightSib - Transfer elements to a right sibling node.
 
int adjustFromLeftSib (unsigned Size, NodeBase &Sib, unsigned SSize, int Add)
 adjustFromLeftSib - Adjust the number if elements in this node by moving elements to or from a left sibling node.
 

Public Attributes

T1 first [N]
 
T2 second [N]
 

Static Public Attributes

static constexpr unsigned Capacity = N
 

Detailed Description

template<typename T1, typename T2, unsigned N>
class llvm::IntervalMapImpl::NodeBase< T1, T2, N >

Definition at line 223 of file IntervalMap.h.

Member Function Documentation

◆ adjustFromLeftSib()

template<typename T1 , typename T2 , unsigned N>
int llvm::IntervalMapImpl::NodeBase< T1, T2, N >::adjustFromLeftSib ( unsigned  Size,
NodeBase< T1, T2, N > &  Sib,
unsigned  SSize,
int  Add 
)
inline

adjustFromLeftSib - Adjust the number if elements in this node by moving elements to or from a left sibling node.

Parameters
SizeNumber of elements in this.
SibRight sibling node.
SSizeNumber of elements in sib.
AddThe number of elements to add to this node, possibly < 0.
Returns
Number of elements added to this node, possibly negative.

Definition at line 319 of file IntervalMap.h.

References llvm::Add, N, Size, llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToLeftSib(), and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToRightSib().

◆ copy()

template<typename T1 , typename T2 , unsigned N>
template<unsigned M>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::copy ( const NodeBase< T1, T2, M > &  Other,
unsigned  i,
unsigned  j,
unsigned  Count 
)
inline

copy - Copy elements from another node.

Parameters
OtherNode elements are copied from.
iBeginning of the source range in other.
jBeginning of the destination range in this.
CountNumber of elements to copy.

Definition at line 236 of file IntervalMap.h.

References assert(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::first, N, llvm::Other, and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::second.

Referenced by llvm::IntervalMapImpl::NodeBase< T1, T2, N >::moveLeft(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToLeftSib(), and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToRightSib().

◆ erase() [1/2]

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase ( unsigned  i,
unsigned  j,
unsigned  Size 
)
inline

erase - Erase elements [i;j).

Parameters
iBeginning of the range to erase.
jEnd of the range. (Exclusive).
SizeNumber of elements in node.

Definition at line 272 of file IntervalMap.h.

References llvm::IntervalMapImpl::NodeBase< T1, T2, N >::moveLeft(), and Size.

Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::erase(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase(), and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToLeftSib().

◆ erase() [2/2]

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase ( unsigned  i,
unsigned  Size 
)
inline

erase - Erase element at i.

Parameters
iIndex of element to erase.
SizeNumber of elements in node.

Definition at line 279 of file IntervalMap.h.

References llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase(), and Size.

◆ moveLeft()

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::moveLeft ( unsigned  i,
unsigned  j,
unsigned  Count 
)
inline

moveLeft - Move elements to the left.

Parameters
iBeginning of the source range.
jBeginning of the destination range.
CountNumber of elements to copy.

Definition at line 250 of file IntervalMap.h.

References assert(), and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::copy().

Referenced by llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase().

◆ moveRight()

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::moveRight ( unsigned  i,
unsigned  j,
unsigned  Count 
)
inline

moveRight - Move elements to the right.

Parameters
iBeginning of the source range.
jBeginning of the destination range.
CountNumber of elements to copy.

Definition at line 259 of file IntervalMap.h.

References assert(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::first, N, and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::second.

Referenced by llvm::IntervalMapImpl::NodeBase< T1, T2, N >::shift(), and llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToRightSib().

◆ shift()

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::shift ( unsigned  i,
unsigned  Size 
)
inline

shift - Shift elements [i;size) 1 position to the right.

Parameters
iBeginning of the range to move.
SizeNumber of elements in node.

Definition at line 286 of file IntervalMap.h.

References llvm::IntervalMapImpl::NodeBase< T1, T2, N >::moveRight(), and Size.

◆ transferToLeftSib()

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToLeftSib ( unsigned  Size,
NodeBase< T1, T2, N > &  Sib,
unsigned  SSize,
unsigned  Count 
)
inline

transferToLeftSib - Transfer elements to a left sibling node.

Parameters
SizeNumber of elements in this.
SibLeft sibling node.
SSizeNumber of elements in sib.
CountNumber of elements to transfer.

Definition at line 295 of file IntervalMap.h.

References llvm::IntervalMapImpl::NodeBase< T1, T2, N >::copy(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::erase(), and Size.

Referenced by llvm::IntervalMapImpl::NodeBase< T1, T2, N >::adjustFromLeftSib().

◆ transferToRightSib()

template<typename T1 , typename T2 , unsigned N>
void llvm::IntervalMapImpl::NodeBase< T1, T2, N >::transferToRightSib ( unsigned  Size,
NodeBase< T1, T2, N > &  Sib,
unsigned  SSize,
unsigned  Count 
)
inline

transferToRightSib - Transfer elements to a right sibling node.

Parameters
SizeNumber of elements in this.
SibRight sibling node.
SSizeNumber of elements in sib.
CountNumber of elements to transfer.

Definition at line 306 of file IntervalMap.h.

References llvm::IntervalMapImpl::NodeBase< T1, T2, N >::copy(), llvm::IntervalMapImpl::NodeBase< T1, T2, N >::moveRight(), and Size.

Referenced by llvm::IntervalMapImpl::NodeBase< T1, T2, N >::adjustFromLeftSib().

Member Data Documentation

◆ Capacity

template<typename T1 , typename T2 , unsigned N>
constexpr unsigned llvm::IntervalMapImpl::NodeBase< T1, T2, N >::Capacity = N
staticconstexpr

Definition at line 225 of file IntervalMap.h.

◆ first

template<typename T1 , typename T2 , unsigned N>
T1 llvm::IntervalMapImpl::NodeBase< T1, T2, N >::first[N]

◆ second

template<typename T1 , typename T2 , unsigned N>
T2 llvm::IntervalMapImpl::NodeBase< T1, T2, N >::second[N]

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