| threaddb 2.0 A file mapped memory container extension

Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
tdb::rgrid_< T, C, D, L > Class Template Reference

Internal representation of the rgrid structure. More...

`#include <threaddbRGrid.h>`

## Public Types
typedef Box< C, D > | Box_
typedef TaskInfo< L > | TaskInfo_

## Public Member Functions
| rgrid_ (const Box_ &rBox_p, uint32_t Depth_p, tdb::database &rDb_p)
| ~rgrid_ ()
const Box_ & | bounding_box () const

## Protected Member Functions
| rgrid_ ()
void | add (const Box_ &rBox_p, const T &rData_p, tdb::database &rDb_p)
| Routine to add a new element to the rgrid. More...
void | query (const Box_ &rBox_p, Functor< T > &rCallback_p, tdb::database &rDb_p, uint8_t Threads_p)
void | recurse (const Box_ &rBox_p, Functor< T > &rCallback_p, tdb::database &rDb_p, std::atomic< uint16_t > *pTaskCount_p, std::mutex *pThreadMutex_p, std::vector< TaskInfo_ * > *pTaskHeap_p) const
| Recursion into next level of the rgrid cells. More...

## Static Protected Member Functions
static void | loop (const Box_ &rBox_p, Functor< T > *pCallback_p, tdb::database *pDb_p, bool Continue_p, TaskInfo_ *pTaskInfo_p, std::atomic< uint16_t > *pTaskCount_p, std::mutex *pThreadMutex_p, std::vector< TaskInfo_ * > *pTaskHeap_p, bool *pThreadExit_p)
| Main query loop for parallel thread execution. More...

## Protected Attributes
friend | L
uint64_t | m_PackageID
uint32_t | m_Depth
std::atomic< size_t > | m_Size
std::atomic< size_t > | m_MaxShapeSize
Cells< T, C, D, L > | m_Subcells

## Friends
class | rgrid< T, C, D, L >
std::ostream & | operator<< (std::ostream &os, const rgrid_ &R)
std::istream & | operator>> (std::istream &is, rgrid_ &R)

## Detailed Description

### template<class T, typename C, size_t D, class L>
class tdb::rgrid_< T, C, D, L >

Internal representation of the rgrid structure.

## Member Typedef Documentation

## ◆ Box_

template<class T, typename C, size_t D, class L>

typedef Box<C, D> tdb::rgrid_< T, C, D, L >::Box_

## ◆ TaskInfo_

template<class T, typename C, size_t D, class L>

typedef TaskInfo<L> tdb::rgrid_< T, C, D, L >::TaskInfo_

## Constructor & Destructor Documentation

## ◆ rgrid_() [1/2]

template<class T, typename C, size_t D, class L>

tdb::rgrid_< T, C, D, L >::rgrid_ | ( | const Box_ & | rBox_p,
|  | uint32_t | Depth_p,
|  | tdb::database & | rDb_p
| ) |  |
| inline

## ◆ ~rgrid_()

template<class T, typename C, size_t D, class L>

tdb::rgrid_< T, C, D, L >::~rgrid_ | ( |  | ) |
| inline

## ◆ rgrid_() [2/2]

template<class T, typename C, size_t D, class L>

tdb::rgrid_< T, C, D, L >::rgrid_ | ( |  | ) |
| inline protected

## Member Function Documentation

## ◆ add()

template<class T, typename C , size_t D, class L >

void tdb::rgrid_< T, C, D, L >::add | ( | const Box_ & | rBox_p,
|  | const T & | rData_p,
|  | tdb::database & | rDb_p
| ) |  |
| protected

Routine to add a new element to the rgrid.

## ◆ bounding_box()

template<class T, typename C, size_t D, class L>

const Box_& tdb::rgrid_< T, C, D, L >::bounding_box | ( |  | ) | const
| inline

## ◆ loop()

template<class T, typename C , size_t D, class L >

void tdb::rgrid_< T, C, D, L >::loop | ( | const Box_ & | rBox_p,
|  | tdb::Functor< T > * | pCallback_p,
|  | tdb::database * | pDb_p,
|  | bool | Continue_p,
|  | TaskInfo_ * | pTaskInfo_p,
|  | std::atomic< uint16_t > * | pTaskCount_p,
|  | std::mutex * | pThreadMutex_p,
|  | std::vector< TaskInfo_ * > * | pTaskHeap_p,
|  | bool * | pThreadExit_p
| ) |  |
| static protected

Main query loop for parallel thread execution.

## ◆ query()

template<class T, typename C, size_t D, class L>

void tdb::rgrid_< T, C, D, L >::query | ( | const Box_ & | rBox_p,
|  | Functor< T > & | rCallback_p,
|  | tdb::database & | rDb_p,
|  | uint8_t | Threads_p
| ) |  |
| protected

## ◆ recurse()

template<class T, typename C , size_t D, class L >

void tdb::rgrid_< T, C, D, L >::recurse | ( | const Box_ & | rBox_p,
|  | tdb::Functor< T > & | rCallback_p,
|  | tdb::database & | rDb_p,
|  | std::atomic< uint16_t > * | pTaskCount_p,
|  | std::mutex * | pThreadMutex_p,
|  | std::vector< TaskInfo_ * > * | pTaskHeap_p
| ) |  | const
| protected

Recursion into next level of the rgrid cells.

## Friends And Related Function Documentation

## ◆ operator<<

template<class T, typename C, size_t D, class L>

std::ostream& operator<< | ( | std::ostream & | os,
|  | const rgrid_< T, C, D, L > & | R
| ) |  |
| friend

## ◆ operator>>

template<class T, typename C, size_t D, class L>

std::istream& operator>> | ( | std::istream & | is,
|  | rgrid_< T, C, D, L > & | R
| ) |  |
| friend

## ◆ rgrid< T, C, D, L >

template<class T, typename C, size_t D, class L>

friend class rgrid< T, C, D, L >
| friend

## Member Data Documentation

## ◆ L

template<class T, typename C, size_t D, class L>

friend tdb::rgrid_< T, C, D, L >::L
| protected

## ◆ m_Depth

template<class T, typename C, size_t D, class L>

uint32_t tdb::rgrid_< T, C, D, L >::m_Depth
| protected

## ◆ m_MaxShapeSize

template<class T, typename C, size_t D, class L>

std::atomic<size_t> tdb::rgrid_< T, C, D, L >::m_MaxShapeSize
| protected

## ◆ m_PackageID

template<class T, typename C, size_t D, class L>

uint64_t tdb::rgrid_< T, C, D, L >::m_PackageID
| protected

## ◆ m_Size

template<class T, typename C, size_t D, class L>

std::atomic<size_t> tdb::rgrid_< T, C, D, L >::m_Size
| protected

## ◆ m_Subcells

template<class T, typename C, size_t D, class L>

Cells<T, C, D, L> tdb::rgrid_< T, C, D, L >::m_Subcells
| protected

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

- B:/threaddbwc/branches/threaddb-2.0/1stParty/threaddb/public/threaddbRGrid.h