par::mem Namespace Reference

Interfaces to the handling of memory. More...


Classes

class  apointer
 Provides you with a pointer to the local part (on this parXXL process) of an par::step::array or par::mem::chunk. More...
class  chid
 Identify a chunk that is defined with respect to an object. More...
class  chid_matrix
class  chunk
 A par::mem::chunk is a simple handle to a part of data defined by an offset and a length of what part should be mapped. More...
class  chunk< void >
 par::mem::chunk<void> is the base of all other par::mem::chunk< T >. More...
class  fcond
 a new class More...
class  file
class  fixed
 Use this to maintain large chunks of memory. More...
class  hashchunk
 Template for a hash table for values of any T type. More...
class  hashl
 An extentable hash array (list) with provision for clashes. More...
class  hashtab
 A simple hash array with no provision on key clashes. More...
class  heap
 Use this to allocate large chunks of memory on the heap. More...
class  LargeNCubeFileReader
class  mapped
class  obid
 Uniquely identify an object inside a par:: run. More...
class  orwgrid
 A relocatable variant of par::sys::owrgrid that can be used with a par::mem::store. More...
class  proto
class  relocatable
 A base class from which all classes that are to be constructed inside a par::mem::store should inherit. More...
class  req
 Interface to allocate large chunks of memory. More...
class  segment
class  stack
 Lets you collect items on a potentially growing stack. More...
class  stoptr
 Hold an absolutely relocatable reference to data inside a store. More...
class  stoptr_void
 The base class of all par::mem::stoptr. More...
class  stoptr_volatile< T volatile >
 Hold an absolutely relocatable reference to data inside a store. More...
class  stoptr_volatile< void const volatile >
class  stoptr_volatile< void volatile >
class  store
 An extendable storage class for potentially shared variables. More...
class  url_t
 Parse an URL into its components. More...

Typedefs

typedef enum sys::storage allocation
 The possible allocations of memory as supported by par::mem.
typedef class chunk< void > chunk_void
typedef par::mem::file::context file_context
typedef par::mem::fixed::context fixed_context
typedef hashl< par::cpp::id,
par::cpp::id
hashlist
typedef hashtab< id, idhashtable
 The most common case of a par::mem::hastab where data_t and key_t are both equal to par::cpp::id.
typedef par::mem::mapped::context mapped_context
typedef cpp::mode_t mode_t
typedef par::sys::str(* namefunc )(par::sys::fd::mount_point *h, cpp::id tag, cpp::id id)
typedef int(* openfunc )(char const *objname, bool ro, bool crea)
 A prototype for opening memory objects.
typedef par::mem::req::context req_context

Functions

template<class T >
void choose (sys::seed_t &seed, chunk< T > &arr, size_t amount)
 Randomly choose a sample of amount elements of a par::mem::chunk and move them in front.
template<typename T >
mem::chunk< T > createShared (mem::allocation loc, off_t len, bool safe)
template<>
chunk< void > createShared< void > (allocation loc, off_t len, bool safe)
template<class T >
size_t divide (chunk< T > &Tp, T const &splitter)
template<typename T >
chunk< T > duplicate (chunk< T const > const &other)
template<>
bool eq (float const &t, float const &s)
template<class T >
bool eq (T *const &t, T *const &s)
 Pointer types are handled special.
template<class T >
bool eq (T const &t, T const &s)
 Compare to hash keys t and s.
template bool eq< cell::register_t const > (cell::register_t const *const &, cell::register_t const *const &)
template<>
bool eq< double > (double const &t, double const &s)
template<>
bool eq< par::cpp::id > (par::cpp::id const &t, par::cpp::id const &s)
sys::fd::fconds_threadfcond_dispatcher (void) throw (sys::error)
sys::fd::mount_pointfcond_FS (void) throw (sys::error)
template<class T >
void generate (chunk< T > &C, par::sys::seed_t &seed, unsigned twist)
template<class T >
void generate (chunk< T > &C, unsigned twist)
template<class T >
void generate (chunk< T > &C, par::sys::seed_t &seed)
template<class T >
void generate (chunk< T > &C)
 Generate an integer random permutation in place.
template void generate< 1 > (mem::chunk< cpp::edge< 1 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 1 > (mem::chunk< cpp::edge< 1 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 2 > (mem::chunk< cpp::edge< 2 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 2 > (mem::chunk< cpp::edge< 2 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 3 > (mem::chunk< cpp::edge< 3 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 3 > (mem::chunk< cpp::edge< 3 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 4 > (mem::chunk< cpp::edge< 4 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 4 > (mem::chunk< cpp::edge< 4 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 5 > (mem::chunk< cpp::edge< 5 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 5 > (mem::chunk< cpp::edge< 5 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 6 > (mem::chunk< cpp::edge< 6 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 6 > (mem::chunk< cpp::edge< 6 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 7 > (mem::chunk< cpp::edge< 7 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 7 > (mem::chunk< cpp::edge< 7 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 8 > (mem::chunk< cpp::edge< 8 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 8 > (mem::chunk< cpp::edge< 8 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template void generate< 9 > (mem::chunk< cpp::edge< 9 > > &E, size_t vlen, double expdeg, bool withloops)
template void generate< 9 > (mem::chunk< cpp::edge< 9 > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template<class T >
par::cpp::id const getid (T *const &t)
template<class T >
par::cpp::id const getid (T const &t)
 Determines a number computed from a hash key t to be used as a value that is inserted into the hash function.
template<>
par::cpp::id const getid< double > (double const &t)
template<>
par::cpp::id const getid< float > (float const &t)
template<>
par::cpp::id const getid< par::cpp::id > (par::cpp::id const &t)
template void grow (stack< cpp::edge< 9 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 9 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 8 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 8 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 7 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 7 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 6 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 6 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 5 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 5 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 4 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 4 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 3 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 3 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 2 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 2 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 1 > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
template void grow (stack< cpp::edge< 1 > > &E, chunk< off_t > const &nV, bool withloops, sys::seed_t &seed)
template<unsigned dim>
void head (chunk< par::cpp::link< 1 > > &tarr, chunk< par::cpp::edge< dim > >const &sarr)
 Restrict each of a set of edges sarr to the vertices found in the last position of the edge.
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 9 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 8 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 7 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 6 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 5 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 4 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 3 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 2 > >const &sarr)
template void head (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 1 > >const &sarr)
template<class T >
bool invalid (T const *const &t)
template<class T >
bool invalid (T *const &t)
template<class T >
bool invalid (T const &t)
 Test whether or not a hash key t is considered to be invalid.
template<>
bool invalid< double > (double const &t)
template<>
bool invalid< float > (float const &t)
template<>
bool invalid< par::cpp::id > (par::cpp::id const &t)
template<class T >
void invalidate (T *&t)
template<class T >
void invalidate (T &t)
 Set the hash key variable t to an invalid value.
template<>
void invalidate< double > (double &t)
template<>
void invalidate< float > (float &t)
template<>
void invalidate< par::cpp::id > (par::cpp::id &t)
int main (int argc, char **argv, char **env)
template<class T >
size_t median (chunk< T > &Tp)
template<class T >
size_t median (chunk< T > &Tp, size_t pivot)
template<typename gT , typename lT >
lT partGen (sys::seed_t &seed, chunk< gT > const &arr, typename sys::partition< 0, gT, lT >::states const &st, lT const *share, gT const *offset, FILE *deb=NULL)
 Generate a subinterval of a permutation.
template<typename gT , typename lT >
lT partGen (chunk< gT > const &arr, typename sys::partition< 0, gT, lT >::states const &st, lT const *share, gT const *offset, FILE *deb=NULL)
 Generate a subinterval of a permutation.
template<class T >
void permute (sys::seed_t &seed, chunk< T > &arr)
 Randomly permute the elements of a par::mem::chunk.
template<class T >
void prefixMax (mem::chunk< T > &chu, T const &carry)
template<class T >
void prefixMax (mem::chunk< T > &chu)
template<class T >
void prefixMin (mem::chunk< T > &chu, T const &carry)
template<class T >
void prefixMin (mem::chunk< T > &chu)
template<class T , class assignOp >
void prefixOp (mem::chunk< T > &chu, T const &carry)
 An in place version with par::mem::chunk and a carry that adds to all the sums.
template<class T , class assignOp >
void prefixOp (mem::chunk< T > &chu)
 An in place version with par::mem::chunk.
template<class T >
void prefixSum (mem::chunk< T > &chu, T const &carry)
template<class T >
void prefixSum (mem::chunk< T > &chu)
template<class T >
void qsort (chunk< T > &Tp)
 Sort a whole chunk.
template<class T >
void quicksort (par::mem::chunk< T > &Tp)
 Sort a whole chunk.
void read_dot (stack< par::cpp::edge< 2 > > &E, chunk< char const > const &st, off_t beg=0, off_t len=0)
 Interpret a character array as a series of edges in dot format.
template size_t removeLoops (chunk< edge< 9 > > &E)
template size_t removeLoops (chunk< edge< 8 > > &E)
template size_t removeLoops (chunk< edge< 7 > > &E)
template size_t removeLoops (chunk< edge< 6 > > &E)
template size_t removeLoops (chunk< edge< 5 > > &E)
template size_t removeLoops (chunk< edge< 4 > > &E)
template size_t removeLoops (chunk< edge< 3 > > &E)
template size_t removeLoops (chunk< edge< 2 > > &E)
template size_t removeLoops (chunk< edge< 1 > > &E)
template<unsigned dim, unsigned where>
void restr (chunk< par::cpp::link< 1 > > &tarr, chunk< par::cpp::edge< dim > >const &sarr)
 Restrict each of a set of edges sarr to the vertices found in position where.
template<unsigned dim>
void reverse (chunk< par::cpp::edge< dim > > &tarr, chunk< par::cpp::edge< dim > >const &sarr)
 Reverse a set of edges sarr.
template void reverse (chunk< cpp::edge< 9 > > &tarr, chunk< cpp::edge< 9 > >const &sarr)
template void reverse (chunk< cpp::edge< 8 > > &tarr, chunk< cpp::edge< 8 > >const &sarr)
template void reverse (chunk< cpp::edge< 7 > > &tarr, chunk< cpp::edge< 7 > >const &sarr)
template void reverse (chunk< cpp::edge< 6 > > &tarr, chunk< cpp::edge< 6 > >const &sarr)
template void reverse (chunk< cpp::edge< 5 > > &tarr, chunk< cpp::edge< 5 > >const &sarr)
template void reverse (chunk< cpp::edge< 4 > > &tarr, chunk< cpp::edge< 4 > >const &sarr)
template void reverse (chunk< cpp::edge< 3 > > &tarr, chunk< cpp::edge< 3 > >const &sarr)
template void reverse (chunk< cpp::edge< 2 > > &tarr, chunk< cpp::edge< 2 > >const &sarr)
template void reverse (chunk< cpp::edge< 1 > > &tarr, chunk< cpp::edge< 1 > >const &sarr)
template<class T >
void scalarMax (T &restrict a, mem::chunk< T const > &chu)
template<class T >
void scalarMin (T &restrict a, mem::chunk< T const > &chu)
template<class T , class assignOp >
void scalarOp (T &restrict a, mem::chunk< T const > &chu)
 Add up a whole chunk.
template<class T >
void scalarSum (T &restrict a, mem::chunk< T const > &chu)
template<class T , PAR_SYS_SORT_F(T) const seqsort>
void sort (par::mem::chunk< T > &Tp)
 Sort a whole chunk.
template<class T >
void swap (T &a, T &b)
template<class T >
void swap2 (chunk< T > &Tp, size_t amount)
template<unsigned dim>
void tail (chunk< par::cpp::link< 1 > > &tarr, chunk< par::cpp::edge< dim > >const &sarr)
 Restrict each of a set of edges sarr to the vertices found in the first position of the edge.
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 9 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 8 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 7 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 6 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 5 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 4 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 3 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 2 > >const &sarr)
template void tail (chunk< cpp::link< 1 > > &tarr, chunk< cpp::edge< 1 > >const &sarr)
template<class T >
void vectorMax (mem::chunk< T > &chu, mem::chunk< T const > &cho)
 An in place version with par::mem::chunk.
template<class T >
void vectorMin (mem::chunk< T > &chu, mem::chunk< T const > &cho)
 An in place version with par::mem::chunk.
template<class T , class assignOp >
void vectorOp (mem::chunk< T > &chu, mem::chunk< T const > &cho)
 An in place version with par::mem::chunk.
template<class T >
void vectorSum (mem::chunk< T > &chu, mem::chunk< T const > &cho)
 An in place version with par::mem::chunk.
template<typename T >
chunk< T > window (chunk< T > const &other, off_t off)
template<typename T >
chunk< T > window (chunk< T > const &other, off_t off, off_t len)
 Let this par::mem::chunk point to a window inside the window of other.
void write_dot (FILE *f, chunk< par::cpp::edge< 2 > >const &E)
 Write a `dot' description of a vector of edges E into f.
.
Read a series of edges in dot format from URL

Start at the first edge that lays entirely after start, and finish with the last edge with that starts before beg+len. end==0 means to read to the end of the file.

template<unsigned dim>
void generate (mem::chunk< cpp::edge< dim > > &E, size_t vlen, double expdeg, bool withloops=false)
 Generate a new graph from scratch.
template<unsigned dim>
void generate (mem::chunk< cpp::edge< dim > > &E, size_t vlen, double expdeg, bool withloops, sys::seed_t &seed)
template<unsigned dim>
void grow (mem::stack< cpp::edge< dim > > &E, size_t nlen, off_t vbeg, size_t vlen, bool withloops, sys::seed_t &seed)
 Randomly grow an existing set of edges E.
template<unsigned dim>
void grow (stack< par::cpp::edge< dim > > &E, chunk< off_t > const &nV, bool withloops, par::sys::seed_t &seed)
 Randomly grow an existing set of edges E with respect to a list of new vertices nV.
void read_dot (stack< par::cpp::edge< 2 > > &E, char const *name, off_t beg=0, off_t len=0)
template<unsigned dim>
size_t removeLoops (chunk< cpp::edge< dim > > &E)

Variables

static allocation const inFile = (sys::file_shared)
static allocation const inSegment = (sys::process_shared)
size_t const min_size = 253
 Minimal size of a keytable.
size_t const not_in = (size_t)-1l
static allocation const nowhere = (sys::unshared)
static allocation const onHeap = (sys::thread_shared)
double const overSize
 How much larger do we have to make the hash.
double const overSizeKeys = 0.75
 How much we oversize the key space to be sure that there are not too much collisions.
double const reduceHash = 0.5
 The size of the additional hash if the first one doesn't fit.
size_t const yet_in = (size_t)-2l


Detailed Description

Interfaces to the handling of memory.

Don't use anything else to allocate large pieces of data and avoid new or malloc whenever you can.

In particular use new and malloc only for small pieces of memory and only if you can't avoid. If ever possible:


Typedef Documentation

The possible allocations of memory as supported by par::mem.

Definition at line 42 of file par_mem_obid.h.

typedef class chunk< void > par::mem::chunk_void

Definition at line 32 of file par_mem_chunk.h.

Definition at line 316 of file par_mem_context.h.

Definition at line 87 of file par_mem_fixed.h.

Definition at line 169 of file par_mem_context.h.

Definition at line 118 of file par_mem_req.h.

Definition at line 112 of file par_mem_context.h.


Function Documentation

template<typename T >
chunk< void > par::mem::createShared ( mem::allocation  loc,
off_t  len,
bool  safe 
) [inline]

Definition at line 646 of file par_mem_chunk.h.

template<>
chunk< void > par::mem::createShared< void > ( allocation  loc,
off_t  len,
bool  safe 
) [inline]

template<class T >
size_t par::mem::divide ( chunk< T > &  Tp,
T const &  splitter 
) [inline]

Definition at line 70 of file par_mem_sort.h.

template<typename T >
chunk< T > par::mem::duplicate ( chunk< T const > const &  other  )  [inline]

Definition at line 638 of file par_mem_chunk.h.

template bool par::mem::eq< cell::register_t const > ( cell::register_t const *const &  ,
cell::register_t const *const &   
)

par::sys::fd::fconds_thread & par::mem::fcond_dispatcher ( void   )  throw (sys::error)

Definition at line 36 of file par_mem_fcond.cc.

par::sys::fd::mount_point & par::mem::fcond_FS ( void   )  throw (sys::error)

Definition at line 27 of file par_mem_fcond.cc.

template<class T >
void par::mem::generate ( chunk< T > &  C,
par::sys::seed_t seed,
unsigned  twist 
) [inline]

Definition at line 111 of file par_mem_permute.h.

template<class T >
void par::mem::generate ( chunk< T > &  C,
unsigned  twist 
) [inline]

Definition at line 126 of file par_mem_permute.h.

template<class T >
void par::mem::generate ( chunk< T > &  C,
par::sys::seed_t seed 
) [inline]

Definition at line 119 of file par_mem_permute.h.

template<unsigned dim>
void par::mem::generate ( mem::chunk< cpp::edge< dim > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops = false 
) [inline]

Generate a new graph from scratch.

Parameters:
E will hold the new edges. If E is already holding some edges beforehand, these will be unlinked from E.
vlen is the amount vertices of this new graph.
expdeg is the desired average degree of the new graph.
withloops true also adds one self-loop per new vertex.

Definition at line 178 of file par_mem_edge.h.

template<unsigned dim>
void par::mem::generate ( mem::chunk< cpp::edge< dim > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t &  seed 
) [inline]

template void par::mem::generate< 1 > ( mem::chunk< cpp::edge< 1 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 1 > ( mem::chunk< cpp::edge< 1 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 2 > ( mem::chunk< cpp::edge< 2 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 2 > ( mem::chunk< cpp::edge< 2 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 3 > ( mem::chunk< cpp::edge< 3 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 3 > ( mem::chunk< cpp::edge< 3 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 4 > ( mem::chunk< cpp::edge< 4 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 4 > ( mem::chunk< cpp::edge< 4 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 5 > ( mem::chunk< cpp::edge< 5 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 5 > ( mem::chunk< cpp::edge< 5 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 6 > ( mem::chunk< cpp::edge< 6 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 6 > ( mem::chunk< cpp::edge< 6 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 7 > ( mem::chunk< cpp::edge< 7 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 7 > ( mem::chunk< cpp::edge< 7 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 8 > ( mem::chunk< cpp::edge< 8 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 8 > ( mem::chunk< cpp::edge< 8 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::generate< 9 > ( mem::chunk< cpp::edge< 9 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops 
)

template void par::mem::generate< 9 > ( mem::chunk< cpp::edge< 9 > > &  E,
size_t  vlen,
double  expdeg,
bool  withloops,
sys::seed_t seed 
)

template<unsigned dim>
void par::mem::grow ( mem::stack< cpp::edge< dim > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t &  seed 
) [inline]

Randomly grow an existing set of edges E.

Parameters:
E represents the existing set of edges on input and will be enlarged to hold the new edges as well.
nlen is the amount of edges to be created
vlen is the amount vertices that have their one endpoint to these new edges
vbeg is the start index of this vertex set
withloops true also adds one self-loop per new vertex.
seed is a seed value for the pseudo random generator.
See also:
par::mem::grow(stack< par::cpp::edge< dim > >& E, chunk< off_t > const& nV, par::sys::seed_t& seed) for a description of the algorithm to chose the new edges.
Randomly grow an existing set of edges E.

This is a semi-local par::cntrl wrapper of par::mem::grow. Here, nlen is the total amount of edges that should be added to all the edges of all processes. The share that processes will create individually is distributed with a hypergeometric distribution that simulates the choice of the new edges out of the old ones.

Must be called conjointly on all processors. It only exchanges control information between the processes, ie information in O(np), no edge data.

withloops true also adds one self-loop per new vertex. With the current implementation the add of the self-loop is always on process 0. This is a strong bias, so use with care.

Definition at line 27 of file par_cntrl_edge.cc.

template<unsigned dim>
void par::mem::grow ( stack< par::cpp::edge< dim > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
par::sys::seed_t seed 
) [inline]

Randomly grow an existing set of edges E with respect to a list of new vertices nV.

This will enlarge E by as many edges as the length of nV. First it makes a random choice E' of nV.Length() edges in E. Then it replaces one vertex at random in each of these new edges by the corresponding vertex in nV.

If withloops is true one self-loop per new vertex is also added.

template void par::mem::grow ( stack< cpp::edge< 9 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 9 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 8 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 8 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 7 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 7 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 6 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 6 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 5 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 5 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 4 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 4 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 3 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 3 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 2 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 2 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 1 > > &  E,
size_t  nlen,
off_t  vbeg,
size_t  vlen,
bool  withloops,
sys::seed_t seed 
)

template void par::mem::grow ( stack< cpp::edge< 1 > > &  E,
chunk< off_t > const &  nV,
bool  withloops,
sys::seed_t seed 
)

template<unsigned dim>
void par::mem::head ( chunk< par::cpp::link< 1 > > &  tarr,
chunk< par::cpp::edge< dim > >const &  sarr 
) [inline]

Restrict each of a set of edges sarr to the vertices found in the last position of the edge.

Definition at line 65 of file par_mem_edge.h.

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 9 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 8 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 7 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 6 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 5 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 4 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 3 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 2 > >const &  sarr 
)

template void par::mem::head ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 1 > >const &  sarr 
)

template<class T >
size_t par::mem::median ( chunk< T > &  Tp  )  [inline]

Definition at line 84 of file par_mem_sort.h.

template<class T >
size_t par::mem::median ( chunk< T > &  Tp,
size_t  pivot 
) [inline]

Definition at line 77 of file par_mem_sort.h.

template<class T >
void par::mem::qsort ( chunk< T > &  Tp  )  [inline]

Sort a whole chunk.

Just a wrapper around par::sys::qsort.

Definition at line 39 of file par_mem_qsort.h.

template<class T >
void par::mem::quicksort ( par::mem::chunk< T > &  Tp  )  [inline]

Sort a whole chunk.

Just a wrapper around par::sys::quicksort.

Definition at line 34 of file par_mem_quicksort.h.

void par::mem::read_dot ( stack< par::cpp::edge< 2 > > &  E,
char const *  name,
off_t  beg = 0,
off_t  len = 0 
)

void par::mem::read_dot ( stack< par::cpp::edge< 2 > > &  E,
chunk< char const > const &  st,
off_t  beg = 0,
off_t  len = 0 
)

Interpret a character array as a series of edges in dot format.

template<unsigned dim>
size_t par::mem::removeLoops ( chunk< cpp::edge< dim > > &  E  )  [inline]

Definition at line 189 of file par_mem_edge.h.

template size_t par::mem::removeLoops ( chunk< edge< 9 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 8 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 7 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 6 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 5 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 4 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 3 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 2 > > &  E  ) 

template size_t par::mem::removeLoops ( chunk< edge< 1 > > &  E  ) 

template<unsigned dim, unsigned where>
void par::mem::restr ( chunk< par::cpp::link< 1 > > &  tarr,
chunk< par::cpp::edge< dim > >const &  sarr 
) [inline]

Restrict each of a set of edges sarr to the vertices found in position where.

This is the par::mem wrapper of par::cpp::restr.

Definition at line 46 of file par_mem_edge.h.

template<unsigned dim>
void par::mem::reverse ( chunk< par::cpp::edge< dim > > &  tarr,
chunk< par::cpp::edge< dim > >const &  sarr 
) [inline]

Reverse a set of edges sarr.

This is the par::mem wrapper of par::cpp::reverse.

Definition at line 83 of file par_mem_edge.h.

template void par::mem::reverse ( chunk< cpp::edge< 9 > > &  tarr,
chunk< cpp::edge< 9 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 8 > > &  tarr,
chunk< cpp::edge< 8 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 7 > > &  tarr,
chunk< cpp::edge< 7 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 6 > > &  tarr,
chunk< cpp::edge< 6 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 5 > > &  tarr,
chunk< cpp::edge< 5 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 4 > > &  tarr,
chunk< cpp::edge< 4 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 3 > > &  tarr,
chunk< cpp::edge< 3 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 2 > > &  tarr,
chunk< cpp::edge< 2 > >const &  sarr 
)

template void par::mem::reverse ( chunk< cpp::edge< 1 > > &  tarr,
chunk< cpp::edge< 1 > >const &  sarr 
)

template<class T , PAR_SYS_SORT_F(T) const seqsort>
void par::mem::sort ( par::mem::chunk< T > &  Tp  )  [inline]

Sort a whole chunk.

Just a wrapper around sort function seqsort.

Definition at line 53 of file par_mem_sort.h.

template<class T >
void par::mem::swap ( T &  a,
T &  b 
) [inline]

Definition at line 60 of file par_mem_hash.h.

template<class T >
void par::mem::swap2 ( chunk< T > &  Tp,
size_t  amount 
) [inline]

Definition at line 63 of file par_mem_sort.h.

template<unsigned dim>
void par::mem::tail ( chunk< par::cpp::link< 1 > > &  tarr,
chunk< par::cpp::edge< dim > >const &  sarr 
) [inline]

Restrict each of a set of edges sarr to the vertices found in the first position of the edge.

Definition at line 74 of file par_mem_edge.h.

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 9 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 8 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 7 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 6 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 5 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 4 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 3 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 2 > >const &  sarr 
)

template void par::mem::tail ( chunk< cpp::link< 1 > > &  tarr,
chunk< cpp::edge< 1 > >const &  sarr 
)

template<typename T >
chunk< T > par::mem::window ( chunk< T > const &  other,
off_t  off 
) [inline]

Definition at line 629 of file par_mem_chunk.h.

template<typename T >
chunk< T > par::mem::window ( chunk< T > const &  other,
off_t  off,
off_t  len 
) [inline]

Let this par::mem::chunk point to a window inside the window of other.

Definition at line 622 of file par_mem_chunk.h.

void par::mem::write_dot ( FILE *  f,
chunk< par::cpp::edge< 2 > >const &  E 
)

Write a `dot' description of a vector of edges E into f.


Variable Documentation

allocation const par::mem::inFile = (sys::file_shared) [static]

Definition at line 45 of file par_mem_obid.h.

allocation const par::mem::inSegment = (sys::process_shared) [static]

Definition at line 46 of file par_mem_obid.h.

allocation const par::mem::nowhere = (sys::unshared) [static]

Definition at line 43 of file par_mem_obid.h.

allocation const par::mem::onHeap = (sys::thread_shared) [static]

Definition at line 44 of file par_mem_obid.h.


Generated on Tue Oct 13 22:04:17 2009 for parXXL by  doxygen 1.5.8