Grid 0.7.0
GridThread Class Reference

#include <ThreadReduction.h>

Inheritance diagram for GridThread:
GridBase GridCartesian GridRedBlackCartesian

Static Public Member Functions

static void SetCores (int cr)
static void SetThreads (int thr)
static void SetMaxThreads (void)
static int GetHyperThreads (void)
static int GetCores (void)
static int GetThreads (void)
static int SumArraySize (void)
static void GetWork (int nwork, int me, int &mywork, int &myoff)
static void GetWork (int nwork, int me, int &mywork, int &myoff, int units)
static void GetWorkBarrier (int nwork, int &me, int &mywork, int &myoff)
static int ThreadBarrier (void)
template<class obj>
static void ThreadSum (std::vector< obj > &sum_array, obj &val, int me)
static void bcopy (const void *src, void *dst, size_t len)

Static Public Attributes

static int _threads
static int _hyperthreads
static int _cores

Detailed Description

Definition at line 35 of file ThreadReduction.h.

Member Function Documentation

◆ SetCores()

void GridThread::SetCores ( int cr)
inlinestatic

Definition at line 41 of file ThreadReduction.h.

References _cores.

Referenced by GridParseLayout().

◆ SetThreads()

void GridThread::SetThreads ( int thr)
inlinestatic

Definition at line 48 of file ThreadReduction.h.

References _threads, and MIN.

Referenced by GridParseLayout().

◆ SetMaxThreads()

void GridThread::SetMaxThreads ( void )
inlinestatic

Definition at line 56 of file ThreadReduction.h.

References _threads.

Referenced by GridParseLayout().

◆ GetHyperThreads()

int GridThread::GetHyperThreads ( void )
inlinestatic

Definition at line 64 of file ThreadReduction.h.

References _cores, and _threads.

◆ GetCores()

int GridThread::GetCores ( void )
inlinestatic

Definition at line 65 of file ThreadReduction.h.

References _cores.

◆ GetThreads()

int GridThread::GetThreads ( void )
inlinestatic

Definition at line 66 of file ThreadReduction.h.

References _threads.

Referenced by Grid_init(), GridLogLayout(), sum_cpu(), and sumD_cpu().

◆ SumArraySize()

int GridThread::SumArraySize ( void )
inlinestatic

Definition at line 67 of file ThreadReduction.h.

References _threads.

◆ GetWork() [1/2]

void GridThread::GetWork ( int nwork,
int me,
int & mywork,
int & myoff )
inlinestatic

Definition at line 69 of file ThreadReduction.h.

References _threads, and GetWork().

Referenced by GetWork(), GetWorkBarrier(), sum_cpu(), and sumD_cpu().

◆ GetWork() [2/2]

void GridThread::GetWork ( int nwork,
int me,
int & mywork,
int & myoff,
int units )
inlinestatic

Definition at line 72 of file ThreadReduction.h.

◆ GetWorkBarrier()

void GridThread::GetWorkBarrier ( int nwork,
int & me,
int & mywork,
int & myoff )
inlinestatic

Definition at line 86 of file ThreadReduction.h.

References GetWork(), and ThreadBarrier().

Referenced by bcopy().

◆ ThreadBarrier()

int GridThread::ThreadBarrier ( void )
inlinestatic

Definition at line 91 of file ThreadReduction.h.

Referenced by GetWorkBarrier(), and ThreadSum().

◆ ThreadSum()

template<class obj>
void GridThread::ThreadSum ( std::vector< obj > & sum_array,
obj & val,
int me )
inlinestatic

Definition at line 100 of file ThreadReduction.h.

References _threads, and ThreadBarrier().

◆ bcopy()

void GridThread::bcopy ( const void * src,
void * dst,
size_t len )
inlinestatic

Definition at line 108 of file ThreadReduction.h.

References bcopy(), and GetWorkBarrier().

Referenced by bcopy().

Field Documentation

◆ _threads

int GridThread::_threads
static

◆ _hyperthreads

int GridThread::_hyperthreads
static

Definition at line 38 of file ThreadReduction.h.

◆ _cores

int GridThread::_cores
static

Definition at line 39 of file ThreadReduction.h.

Referenced by GetCores(), GetHyperThreads(), and SetCores().


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