CLRX  1
An unofficial OpenCL extensions designed for Radeon GPUs
Public Member Functions | Public Attributes | List of all members
CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1 Struct Reference

Node1 - main node that holds Node0's or Node1's. More...

#include <DTree.h>

Inheritance diagram for CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1:
CLRX::DTree< K, T, Comp, KeyOfVal, AT >::NodeBase

Public Member Functions

void freeArray ()
 helper for freeing array
 
void copyArray (const Node1 &node)
 
 Node1 (const Node1 &node)
 
 Node1 (Node1 &&node) noexcept
 
 Node1 (Node0 &&n0, Node0 &&n1, const KeyOfVal &kofval)
 create from two Node0's
 
 Node1 (Node1 &&n0, Node1 &&n1)
 create from two Node1's
 
Node1operator= (const Node1 &node)
 
Node1operator= (Node1 &&node) noexcept
 
Node0getFirstNode0 ()
 
const Node0getFirstNode0 () const
 
Node0getLastNode0 ()
 
const Node0getLastNode0 () const
 
const Node1parent () const
 get parent node
 
Node1parent ()
 get parent node
 
void allocate0 (cxuint newCapacity)
 
void allocate1 (cxuint newCapacity)
 
void reserve0 (cxuint newCapacity)
 reserve0 elements in Node0's array More...
 
void reserve1 (cxuint newCapacity)
 reserve1 elements in Node0's array More...
 
cxuint lowerBoundN (const K &v, const Comp &comp, const KeyOfVal &kofval) const
 find node that hold first element not less than value
 
cxuint upperBoundN (const K &v, const Comp &comp, const KeyOfVal &kofval) const
 find node that hold first element greater than value
 
void insertNode0 (Node0 &&node, cxuint index, const KeyOfVal &kofval, bool updateTotSize=true)
 insert Node0 - (move to this node)
 
void insertNode1 (Node1 &&node, cxuint index, bool updateTotSize=true)
 insert Node1 - (move to this node)
 
void eraseNode0 (cxuint index, const KeyOfVal &kofval, bool updateTotSize=true)
 remove node0 with index from this node
 
void eraseNode1 (cxuint index, bool updateTotSize=true)
 remove node1 with index from this node
 
void reorganizeNode0s (cxuint start, cxuint end, bool removeOneNode0=false)
 
void merge (Node1 &&n2)
 
void splitNode (Node1 &n2, const KeyOfVal &kofval)
 
void reorganizeNode1s (cxuint start, cxuint end, const KeyOfVal &kofval, bool removeOneNode1=false)
 
- Public Member Functions inherited from CLRX::DTree< K, T, Comp, KeyOfVal, AT >::NodeBase
 NodeBase (cxbyte _type)
 

Public Attributes

cxbyte index
 index in array
 
cxbyte size
 number of the nodes
 
cxbyte capacity
 capacity
 
size_t totalSize
 total size in this node (count recursively)
 
first
 
union {
   Node0 *   array
 
   Node1 *   array1
 array hold Node0's
 
}; 
 first element in this node (recursively) array are allocated by bytes, preceding part is heap that hold parent node
 
- Public Attributes inherited from CLRX::DTree< K, T, Comp, KeyOfVal, AT >::NodeBase
cxbyte type
 

Detailed Description

template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
struct CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1

Node1 - main node that holds Node0's or Node1's.

Member Function Documentation

template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
void CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1::copyArray ( const Node1 node)
inline

set parent for this array

set parent for this array

template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
void CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1::allocate0 ( cxuint  newCapacity)
inline

construct Node1's

template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
void CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1::allocate1 ( cxuint  newCapacity)
inline

construct Node1's

template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
void CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1::reserve0 ( cxuint  newCapacity)
inline

reserve0 elements in Node0's array

construct Node1's

template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
void CLRX::DTree< K, T, Comp, KeyOfVal, AT >::Node1::reserve1 ( cxuint  newCapacity)
inline

reserve1 elements in Node0's array

construct Node1's


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