par::sys Namespace Reference

Interfaces that use or provide system functions and structures. More...


Namespaces

namespace  fd
 Administrate file descriptors, system paths and locks.

Classes

struct  _format
struct  _qsort
struct  _rwlocking
 Nothing to be used directly but via the macro PAR_SYS_RDLOCK or PAR_SYS_WRLOCK.
class  alock
 Data for an anonymous rw-lock. More...
class  barrier
 A simple barrier that may live in thread or process shared memory. More...
class  conditions
 Interface for posix conditions. More...
class  conditions< 0 >
 Just a dummy wrapper around par::sys::mutex. More...
class  conds
 A group of condition variables that are glued to a par::cpp::mutex. More...
class  count
 A ressource counter that is thread safe. More...
class  counted
 A simple wrapper class to add reference counting to a base class T. More...
class  counter
 A wrapper class template for \ par::sys::counterTemp< threshold, par::sys::conditions< 2 > >. More...
class  counterTemp
 A ressource counter that is thread safe and may signal over- and under-flow conditions. More...
class  cref
 A simple reference with counting. More...
class  cref_new
 A class needed for the implementation of UNINEW(). More...
class  dentry
 A simple key-value structure for dictionaries of type T that are indexed by a string. More...
struct  distribInstance
 Collect information of a distribution instance. More...
class  distribution
 Provide functionality of a distribution function. More...
class  env
 a class to access environment variables. More...
struct  error
 Struct that all of par::sys uses to throw errors. More...
class  file
class  mix
struct  mutex
 Interface for posix mutexes. More...
struct  once_both
 Create a static ``variable'' of type T that is constructed and destructed exactly once. More...
struct  once_copy
 Create a static ``variable'' of type T that is constructed and destructed exactly once. More...
struct  once_t
 A wrapper (resp. reimplementation and extension) of pthread_once_t. More...
struct  once_void
 Create a static ``variable'' of type T that is constructed and destructed exactly once. More...
class  opt
 Encapsulates and eases the use of the getopt library call. More...
class  orwgrid
 A wrapper for par::cpp::orwgrid_rel that in addition provides allocation of the task table on the heap. More...
class  orwgrid_rel
 A D dimensional grid of ordered read-write locks of type T. More...
class  orwl
 Ordered Read-Write Locks. More...
class  orwtask
 A wrapper around par::sys::orwtask_rel that also allocates space for the tables if necessary, i.e if L = 0. More...
class  orwtask_rel
 Ordered Read-Write Tasks. More...
class  partition
class  partition< 0, gT, lT >
struct  partitionStates
struct  partitionStates< 0, gT, lT >
class  permrand
 Hold the status of an advanced pseudo random generator (PRG). More...
class  persistent
 Implements a simple reference counting mechanism. More...
struct  pthread_cancel_asynchronous
 Nothing to be used directly but via the macro PAR_CONCUR. More...
struct  pthread_cancel_deferred
 Nothing to be used directly but via the macro PAR_SYS_MUT_EXCL. More...
class  quarantine
 Internal class. More...
class  refcount
 Implements a simple reference counting mechanism. More...
struct  rlimit
 Helper class to manipulate different POSIXressource limits. More...
class  rusage
 A wrapper arount the POSIX structure rusage. More...
class  rwhandle
 A handle for a rw-lock. More...
class  rwhandle2
 A double handle for an alternating rw-lock. More...
class  rwinfo
 The state info of a par::sys::rwhandle. More...
class  rwlock
 Implements read/write-lock with semaphores. More...
class  rwobj_generic
 A generic read-write object class. More...
class  seed_t
 Hold the state of a pseudo random process. More...
class  segment
class  sem
 Wrap the POSIX unnamed semaphore type. More...
class  semconds
 A condition class that is sharable between threads and processes. More...
class  semconds< 0 >
 The innermost implementation of the par::sys::semconds classes. More...
class  semmut
 A mutex class that is sharable between threads and processes. More...
class  serialize
class  serialize_common
 Implements the serialization feature of the thread implementation. More...
class  sfd_common
class  sfd_file
 Shared file descriptor for files. More...
class  sfd_file_private
class  sfd_private
class  sfd_segment
 Shared file descriptor for shared segments. More...
class  sfd_segment_private
class  sigchain
 Cleanup signal handler class. More...
struct  sortSpec
struct  specific
 Provide thread specific global variables. More...
class  stat
 Hold the status of a filesystem entry or file descriptor. More...
class  str
 A wrapper around a char* that implements POSIX str... functions. More...
class  stree
 A template class that wraps POSIX functions tsearch etc. More...
class  strtmp
class  thread
 Launch a worker thread for a specific task. More...
class  thread_t
 The interface class for par::sys::thread and derivatives. More...
class  timespec
 A wrapper to the system data structure timespec. More...
class  trap
 Catching system faults. More...
class  uhash
 Wrap cpp::uhash to have a random initialization from par::sys::seed_t. More...
class  unserialize
class  ziggurat
 A class that implements Marsaglia's ziggurat method for sampling probability distributions with continuous, decreasing density function. More...

Typedefs

typedef ushort seed48_t [ushort_per_seed48]
 Type that may hold the state information of a random seed for the jrand48 family of functionss.
typedef uint64_t seedmax64_t [uint64_per_randmax]
 Type that may hold the state information of a random seed for integers of maximum width together with some padding to align it with seedmax64_t.
typedef ushort seedmax_t [rand_max]
 Type that may hold the state information of a random seed for integers of maximum width together with some padding to align it with seedmax64_t.
typedef semconds< 1 > semcond
typedef struct sigaction sigaction_struct
typedef void(* sighandler_t )(int s, siginfo_t *, void *)
typedef ::_stat_struct stat_struct
typedef double(* variate_t )(seed_t &)
 The API of a random variate (= random generator).

Enumerations

enum  distributions {
  fixed, uniform, normal, exponential,
  beta, gamma, binomial, hypergeometric,
  Poisson
}
 The names of the different random distributions that we handle. More...
enum  rlimits {
  rlimit_core = RLIMIT_CORE, rlimit_cpu = RLIMIT_CPU, rlimit_data = RLIMIT_DATA, rlimit_fsize = RLIMIT_FSIZE,
  rlimit_nofile = RLIMIT_NOFILE, rlimit_stack = RLIMIT_STACK, rlimit_as = RLIMIT_AS
}
 The known POSIX resource types. More...
enum  storage {
  unshared = (PTHREAD_PROCESS_PRIVATE || PTHREAD_PROCESS_SHARED) + 2, thread_shared = PTHREAD_PROCESS_PRIVATE, process_shared = PTHREAD_PROCESS_SHARED, file_shared = (PTHREAD_PROCESS_PRIVATE || PTHREAD_PROCESS_SHARED) + 1,
  remote = (PTHREAD_PROCESS_PRIVATE || PTHREAD_PROCESS_SHARED) + 3
}

Functions

template<typename T >
void assignCheck (T *a, T const &b, T const *low, size_t size)
template<typename T >
void assignCheck (T *a, T const &b, T const *low, T const *high)
template<class T >
void choose (par::sys::seed_t &seed, T arrp[], size_t length, size_t amount)
 Choose amount elements in arrp and move them to front.
template<typename T >
choosePrime (T n, T len, seed_t &seed)
template<typename T >
choosePrime (T n, T len)
size_t cksum (char const *name)
 Compute a checksum of the string that name is pointing to.
template<class T >
size_t cksum (size_t size, T const *seed)
 Compute a checksum of the data that seed is pointing to.
template<>
size_t cksum< char > (size_t size, char const *seed)
 Compute a checksum of the data that seed is pointing to.
char * concat (char const *t, char const *o) throw (std::bad_alloc)
 Concat t and o into a freshly allocated string.
double drand (void)
 This one is slow since it uses a predefined seed. Don't use it often.
double drand (seed_t &seed)
 Return a pseudo random double between 0.0 and 1.0.
double drand (seed_t *seed)
 Return a pseudo random double between 0.0 and 1.0.
double drandBeta (seed_t &seed, double a, double b)
 Return a random number that is distributed with a beta distribution of mean shape and variance shape.
double drandBetaAW1 (seed_t &seed, double a, double b, double t)
 Internal for par::sys::drandBeta.
double drandBetaAW2 (seed_t &seed, double a, double b, double t)
 Internal for par::sys::drandBeta.
double drandBetaCheng78 (seed_t &seed, double a, double b, double s, double lambda)
 Internal for par::sys::drandBeta.
double drandBetaCheng78large (seed_t &seed, double a, double b)
 Internal for par::sys::drandBeta.
double drandBetaCheng78small (seed_t &seed, double a, double b)
 Internal for par::sys::drandBeta.
double drandBetaInner (seed_t &seed, double a, double b)
 Internal for par::sys::drandBeta.
double drandExponential (seed_t &seed, double mean)
 Return a random number that is distributed with a exponential distribution of mean mean and standard deviation mean.
double drandExponential (seed_t &seed)
 Return a random number that is distributed with a exponential distribution of mean 1 and standard deviation 1.
double drandExponentialSlow (seed_t &seed, double mean)
 Return a random number that is distributed with a exponential distribution of mean mean and standard deviation mean.
double drandExponentialSlow (seed_t &seed)
 Return a random number that is distributed with a exponential distribution of mean 1 and standard deviation 1.
double drandGamma (seed_t &seed, double shape, double scale)
 Return a random number that is distributed with a gamma distribution of mean shape and variance shape * scale * scale.
double drandGamma (seed_t &seed, double shape)
 Return a random number that is distributed with a gamma distribution of mean shape and variance shape.
double drandNormal (seed_t &seed, double mean, double sdev)
 Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean and standard deviation sdev.
double drandNormal (seed_t &seed, double mean)
 Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean.
double drandNormal (seed_t &seed)
 Return a random number that is distributed with a Gaussian (= normal) distribution of mean 0 and standard deviation 1.
void drandNormal2 (seed_t &seed, double &restrict ran0, double &restrict ran1, double mean0, double mean1, double sdev0, double sdev1)
void drandNormal2 (seed_t &seed, double &restrict ran0, double &restrict ran1, double mean0, double mean1)
void drandNormal2 (seed_t &seed, double &restrict ran0, double &restrict ran1)
 Return two indpendent random numbers that are distributed with a Gaussian (= normal) distribution of mean 0 and standard deviation 1.
double drandNormalSlow (seed_t &seed, double mean, double sdev)
 Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean and standard deviation sdev.
double drandNormalSlow (seed_t &seed, double mean)
 Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean and standard deviation 1.
double drandNormalSlow (seed_t &seed)
 Return a random number that is distributed with a Gaussian (= normal) distribution of mean 0 and standard deviation 1.
double drandUniform (seed_t &seed, double right)
 Return a random number that is distributed with a real valued uniform distribution in the interval [0.0, right).
double drandUniform (seed_t &seed, double left, double right)
 Return a random number that is distributed with a real valued uniform distribution in the interval [left, right).
double drandUniform (seed_t &seed)
 Return a random number that is distributed with a real valued uniform distribution in the interval [0.0, 1.0).
double erand48 (seed48_t &seed)
 Wrapper for the POSIX function erand48.
cpp::format format (str &f)
 Same as par::cpp::format.
template<>
void generate (par::sys::seed_t &seed, long arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, ulong arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, unsigned arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, signed arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, short arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, ushort arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, schar arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, uchar arrp[], size_t length, unsigned twist)
template<>
void generate (par::sys::seed_t &seed, bool arrp[], size_t length, unsigned twist)
template<class T >
void generate (par::sys::seed_t &seed, T arrp[], size_t length, unsigned twist)
template<class T >
void generate (par::sys::seed_t &seed, T arrp[], size_t length)
template<class T >
void generate (T arrp[], size_t length)
 Generate an integer random permutation in place.
size_t get_prime (void)
str gethostname (void)
template<typename uT >
void hypermat (size_t c, const uT C[], uT res[])
template<typename uT >
void hypermat (size_t c, uT const C[], uT res[], seed_t &seed)
 Sample an nn permutation matrix.
template<typename uT >
void hypermat (size_t c, const uT C[], size_t u, const uT U[], uT res[])
template<typename uT >
void hypermat (size_t c, const uT C[], size_t u, const uT U[], uT res[], seed_t &seed)
 Sample an c u permutation matrix.
template<typename uT >
uT hyperprox (par::sys::seed_t &seed, uT N1, uT N2, uT T)
 Similar to par::sys::randHypergeom.
void init_rand (void)
 Initialize a hidden per parXXL-process seed to an un-guessable value.
void init_rand (seed_t &seed)
 Initialize seed to an un-guessable value.
void init_segment (size_t session)
void initenv (void)
bool isatty (FILE *F)
bool isatty (int fd)
long jrand48 (seed48_t &seed)
 Wrapper for the POSIX function jrand48.
void lcong48 (uint64_t a, uint16_t b)
void lcong48 (seed48_t const &X, uint64_t a, uint16_t b)
int main (int argc, char **argv, char **env)
template<typename T >
void msync (T const volatile *addr)
template<typename T >
void msync (void const volatile *addr)
void msync (void const volatile *addr, size_t len)
long nrand48 (seed48_t &seed)
 Wrapper for the POSIX function nrand48.
uint64_t nt (void)
 The number of all parXXL processes that are POSIX threads in the same POSIX process.
void const * pagestart (void const *)
void * pagestart (void *p)
 Compute the start of the memory page for p.
template<class T >
void permute (par::sys::seed_t &seed, T arrp[], size_t length)
 Perform an in place random permutation.
void prefetch (void const *addr, size_t length, int advice=POSIX_MADV_WILLNEED)
 prefetch a memory block into memory for intent for reading or writing into that block.
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2, T3 const &a3, T4 const &a4, T5 const &a5, T6 const &a6, T7 const &a7, T8 const &a8)
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2, T3 const &a3, T4 const &a4, T5 const &a5, T6 const &a6, T7 const &a7)
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2, T3 const &a3, T4 const &a4, T5 const &a5, T6 const &a6)
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2, T3 const &a3, T4 const &a4, T5 const &a5)
template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2, T3 const &a3, T4 const &a4)
template<typename T0 , typename T1 , typename T2 , typename T3 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2, T3 const &a3)
template<typename T0 , typename T1 , typename T2 >
void print (FILE *of, T0 const &a0, T1 const &a1, T2 const &a2)
template<typename T0 , typename T1 >
void print (FILE *of, T0 const &a0, T1 const &a1)
template<typename T >
void print (size_t len, FILE *of, T const *o)
 Print a vector o of length len as a comma seperated list to file of.
template<unsigned d>
void print (FILE *of, char const o[d])
template<typename T >
void print (FILE *of, T const &o)
 A wrapper that lifts the par::cpp::print interface to par::sys.
void printenv (FILE *of)
template<typename nat >
void printSample (nat(*const variate)(seed_t &), char const *name, nat const left, nat const right, size_t steps, seed_t &seed)
 Print a sample of a random variate variate to a file.
template<typename T >
void qsort (T *Tp, size_t size)
 A wrapper around the POSIX qsort function.
template<typename T >
void qsort_1_ (T *Pt, size_t size)
template<class T >
void quicksort (T *Pt, size_t size)
 Comparison based sorting.
template<class T >
void quicksort (T *Pt, size_t size, par::sys::seed_t &seed)
template<typename T >
void quicksort_1_ (T *Pt, size_t size)
size_t rand (void)
 This one is slow since it uses a predefined seed. Don't use it often.
size_t rand (seed_t &restrict seed)
 Return a pseudo random number with as many bits as size_t may hold.
size_t rand (seed_t *restrict seed)
 Return a pseudo random number with as many bits as size_t may hold.
size_t randBinomial (seed_t &seed, size_t trials, double prob)
 Sample a draw of a binomial distribution.
template<typename uT >
void randHypergeom (par::sys::seed_t &seed, uT total, uT whites, size_t draws, uT *draw)
 Sample a variate hypergeometric distribution.
template<typename uT >
uT randHypergeom (par::sys::seed_t &seed, uT total, uT whites, uT draw)
 Sample a hypergeometric distribution.
template void randHypergeom< unsigned int > (par::sys::seed_t &seed, unsigned int total, unsigned int whites, size_t draws, unsigned int *draw)
template<>
unsigned int randHypergeom< unsigned int > (par::sys::seed_t &seed, unsigned int N, unsigned int M, unsigned int n)
template void randHypergeom< unsigned long > (par::sys::seed_t &seed, unsigned long total, unsigned long whites, size_t draws, unsigned long *draw)
template<>
unsigned long randHypergeom< unsigned long > (par::sys::seed_t &seed, unsigned long N, unsigned long M, unsigned long n)
template void randHypergeom< unsigned short > (par::sys::seed_t &seed, unsigned short total, unsigned short whites, size_t draws, unsigned short *draw)
template<>
unsigned short randHypergeom< unsigned short > (par::sys::seed_t &seed, unsigned short N, unsigned short M, unsigned short n)
template<class T >
void randomSample (size_t n, T *A, int tag)
size_t randPoisson (seed_t &seed, double lambda)
 Sample a draw of a Poisson distribution.
ssize_t randUniform (seed_t &seed, ssize_t left, ssize_t right)
 Return a random number that is distributed with a ssize_t valued uniform distribution in the interval [left, right).
size_t randUniform (seed_t &seed, size_t left, size_t right)
 Return a random number that is distributed with a size_t valued uniform distribution in the interval [left, right).
size_t randUniform (seed_t &seed, size_t right)
 Return a random number that is distributed with a size_t valued uniform distribution in the interval [0, right).
void read_dot (par::cpp::edge< 2 > &e, char const *s) throw (error)
 Scan s for a `dot' description of an edge and store it in e.
template<>
void realloc (void const *ptr)
template<class T >
void realloc (T const *ptr)
template<>
void realloc (void *ptr)
template<class T >
void realloc (T *ptr)
 A type safe variant of realloc(ptr,0) to be used instead of free.
template<class T >
T * realloc (size_t len)
 A type safe variant of realloc(NULL,something) to be used instead of malloc.
template<>
void * realloc (void *ptr, size_t len)
template<class T >
T * realloc (T *ptr, size_t len)
 A type safe variant of realloc.
template<>
void * realloc< void > (size_t len)
uint64_t realrand (void)
 Provide 64 bits of real randomness, if available.
int report (char const *format,...) DEPRECATED_ATTR
int report (FILE *os, char const *format,...) DEPRECATED_ATTR
double seconds (::timespec const &t)
::timespecset (::timespec &t, double other)
void sleepfor (double sec)
 Sleep for at least sec seconds.
strtmp sprintf (char const *format,...)
int sputter (FILE *os, char const *head, char const *message)
 For internal use only.
sys::str stamp (void)
char * strdup (const char *s1)
int sync (bool firstTime=false)
 Synchronize all parXXL processes that share the same address space, i.e all threads.
void throw_error (char const *st, error::name er=error::VALID)((noreturn)) throw (par::sys::error)
int trace (char const *name, int line) DEPRECATED_ATTR
int trace (char const *name, int line, FILE *os, char const *format,...) DEPRECATED_ATTR
int trace (char const *name, int line, char const *format,...) DEPRECATED_ATTR
size_t urand (size_t upperlimit)
 This one is slow since it uses a predefined seed. Don't use it often.
size_t urand (seed_t &seed)
 Return a non-negative pseudo random number, smaller than par::sys::seed_t::urand_max.
size_t urand (seed_t &seed, size_t upperlimit)
 Return a non-negative pseudo random number, smaller than upperlimit.
size_t urand (seed_t *seed)
 Return a non-negative pseudo random number, smaller than par::sys::seed_t::urand_max.
size_t urand (seed_t *seed, size_t upperlimit)
 Return a non-negative pseudo random number, smaller than upperlimit.
void size_t am() void (par::sys::rwlock::error)
void write_dot (FILE *f, par::cpp::edge< 2 > const *E, size_t length)
 Write a `dot' description of a vector of edges E into f.
void write_dot (FILE *f, par::cpp::edge< 2 > const &e)
 Write a `dot' description of an edge e into f.
POSIX Platform Status
These give a long list of functions that interface the calls to POSIX' sysconf function.

long advisory_info (void)
 Interface to the static POSIX feature.
long aio_listio_max (void)
 Interface to the static POSIX feature.
long aio_max (void)
 Interface to the static POSIX feature.
long aio_prio_delta_max (void)
 Interface to the static POSIX feature.
long arg_max (void)
 Interface to the static POSIX feature.
long asynchronous_io (void)
 Interface to the static POSIX feature.
long atexit_max (void)
 Interface to the static POSIX feature.
long barriers (void)
 Interface to the static POSIX feature.
long bc_base_max (void)
 Interface to the static POSIX feature.
long bc_dim_max (void)
 Interface to the static POSIX feature.
long bc_scale_max (void)
 Interface to the static POSIX feature.
long bc_string_max (void)
 Interface to the static POSIX feature.
long c_bind (void)
 Interface to the static POSIX feature.
long c_dev (void)
 Interface to the static POSIX feature.
long c_version (void)
 Interface to the static POSIX feature.
long char_term (void)
 Interface to the static POSIX feature.
long child_max (void)
 Interface to the static POSIX feature.
long clk_tck (void)
 Interface to the static POSIX feature.
long clock_selection (void)
 Interface to the static POSIX feature.
long coll_weights_max (void)
 Interface to the static POSIX feature.
long cputime (void)
 Interface to the static POSIX feature.
long delaytimer_max (void)
 Interface to the static POSIX feature.
long expr_nest_max (void)
 Interface to the static POSIX feature.
long file_locking (void)
 Interface to the static POSIX feature.
long fort_dev (void)
 Interface to the static POSIX feature.
long fort_run (void)
 Interface to the static POSIX feature.
long fsync (void)
 Interface to the static POSIX feature.
long getgr_r_size_max (void)
 Interface to the static POSIX feature.
long getpw_r_size_max (void)
 Interface to the static POSIX feature.
long host_name_max (void)
 Interface to the static POSIX feature.
long iov_max (void)
 Interface to the static POSIX feature.
long ipv6 (void)
 Interface to the static POSIX feature.
long job_control (void)
 Interface to the static POSIX feature.
long line_max (void)
 Interface to the static POSIX feature.
long localedef (void)
 Interface to the static POSIX feature.
long login_name_max (void)
 Interface to the static POSIX feature.
long mapped_files (void)
 Interface to the static POSIX feature.
long memlock (void)
 Interface to the static POSIX feature.
long memlock_range (void)
 Interface to the static POSIX feature.
long memory_protection (void)
 Interface to the static POSIX feature.
long message_passing (void)
 Interface to the static POSIX feature.
long monotonic_clock (void)
 Interface to the static POSIX feature.
long mq_open_max (void)
 Interface to the static POSIX feature.
long mq_prio_max (void)
 Interface to the static POSIX feature.
long multi_process (void)
 Interface to the static POSIX feature.
long ngroups_max (void)
 Interface to the static POSIX feature.
long open_max (void)
 Interface to the dynamic POSIX feature.
long pagesize (void)
 Interface to the static POSIX feature.
long pbs (void)
 Interface to the static POSIX feature.
long pbs_accounting (void)
 Interface to the static POSIX feature.
long pbs_checkpoint (void)
 Interface to the static POSIX feature.
long pbs_locate (void)
 Interface to the static POSIX feature.
long pbs_message (void)
 Interface to the static POSIX feature.
long pbs_track (void)
 Interface to the static POSIX feature.
long posix1_version (void)
 Interface to the static POSIX feature.
long posix2_version (void)
 Interface to the static POSIX feature.
long prioritized_io (void)
 Interface to the static POSIX feature.
long priority_scheduling (void)
 Interface to the static POSIX feature.
long pthread_destructor_iterations (void)
 Interface to the static POSIX feature.
long pthread_keys_max (void)
 Interface to the static POSIX feature.
long pthread_stack_min (void)
 Interface to the static POSIX feature.
long pthread_threads_max (void)
 Interface to the static POSIX feature.
long raw_sockets (void)
 Interface to the static POSIX feature.
long re_dup_max (void)
 Interface to the static POSIX feature.
long reader_writer_locks (void)
 Interface to the static POSIX feature.
long realtime_signals (void)
 Interface to the static POSIX feature.
long regex_version (void)
 Interface to the static POSIX feature.
long regexp (void)
 Interface to the static POSIX feature.
long rtsig_max (void)
 Interface to the static POSIX feature.
long saved_ids (void)
 Interface to the static POSIX feature.
long sem_nsems_max (void)
 Interface to the static POSIX feature.
long sem_value_max (void)
 Interface to the static POSIX feature.
long semaphores (void)
 Interface to the static POSIX feature.
long shared_memory_objects (void)
 Interface to the static POSIX feature.
long shell (void)
 Interface to the static POSIX feature.
long sigqueue_max (void)
 Interface to the static POSIX feature.
long spawn (void)
 Interface to the static POSIX feature.
long spin_locks (void)
 Interface to the static POSIX feature.
long sporadic_server (void)
 Interface to the static POSIX feature.
long stream_max (void)
 Interface to the static POSIX feature.
long sw_dev (void)
 Interface to the static POSIX feature.
long symloop_max (void)
 Interface to the static POSIX feature.
long synchronized_io (void)
 Interface to the static POSIX feature.
long thread_attr_stackaddr (void)
 Interface to the static POSIX feature.
long thread_attr_stacksize (void)
 Interface to the static POSIX feature.
long thread_cputime (void)
 Interface to the static POSIX feature.
long thread_prio_inherit (void)
 Interface to the static POSIX feature.
long thread_prio_protect (void)
 Interface to the static POSIX feature.
long thread_priority_scheduling (void)
 Interface to the static POSIX feature.
long thread_process_shared (void)
 Interface to the static POSIX feature.
long thread_safe_functions (void)
 Interface to the static POSIX feature.
long thread_sporadic_server (void)
 Interface to the static POSIX feature.
long threads (void)
 Interface to the static POSIX feature.
long timeouts (void)
 Interface to the static POSIX feature.
long timer_max (void)
 Interface to the static POSIX feature.
long timers (void)
 Interface to the static POSIX feature.
long trace (void)
 Interface to the static POSIX feature.
long trace_event_filter (void)
 Interface to the static POSIX feature.
long trace_inherit (void)
 Interface to the static POSIX feature.
long trace_log (void)
 Interface to the static POSIX feature.
long tty_name_max (void)
 Interface to the static POSIX feature.
long typed_memory_objects (void)
 Interface to the static POSIX feature.
long tzname_max (void)
 Interface to the static POSIX feature.
long upe (void)
 Interface to the static POSIX feature.
long v6_ilp32_off32 (void)
 Interface to the static POSIX feature.
long v6_ilp32_offbig (void)
 Interface to the static POSIX feature.
long v6_lp64_off64 (void)
 Interface to the static POSIX feature.
long v6_lpbig_offbig (void)
 Interface to the static POSIX feature.

Variables

static char const *const alert [] = { "", "" }
unsigned const bits_per_rand48 = 32u
 The amount of bits that we use per call of the rand48 series.
unsigned const char_per_rand48 = bits_per_rand48 / 8u
static char const *const clear [] = { "", "\r" }
FILE * dout = NULL
 Debug output of par::sys.
 gT
long const jrand48_mask = (((1L << (bits_per_rand48 - 1u)) - 1L) << 1u) | 1L
 Used to mask away unused bits in the result used from jrand48.
static par::sys::mutex const mutex_initializer = { PTHREAD_MUTEX_INITIALIZER }
static char const *const off [] = { "", "" }
::pthread_cond_t const pthread_cond_initializer = PTHREAD_COND_INITIALIZER
static pthread_mutex_t const pthread_mutex_initializer = PTHREAD_MUTEX_INITIALIZER
unsigned const rand_max = sizeof(seedmax64_t) / sizeof(ushort)
 The maximum number of ushort that we need for an integer of maximum width.
static char const *const remark [] = { "", "" }
bool shutOff = false
static double const theodorus = 1.7320508075688772935274463
unsigned const uint64_per_randmax
 The number of uint64_t that we need to cover all these rand_max seed48_t.
unsigned const ushort_per_seed48 = 3u
 The amount of ushort that the underlying primitives use per seed.


Detailed Description

Interfaces that use or provide system functions and structures.

This namespace tries to give concise interfaces and wrappers to POSIX functions. We try to keep as close to the spirit of the original interfaces wherever this is possible.

The goal (and sometimes necessity) is to make these POSIX functions better suitable for programming with C++. Especially type safety is a primary goal: where POSIX often acts on void* and requires to pass the size of the corresponding object as an argument we provide template wrappers that take a pointer to a specific type and that than simply pass sizeof that type to the POSIX function.

Another issue are assertions: the interfaces that we give to the str... family of POSIX functions assert that all the strings that we handle are NULL-terminated.


Typedef Documentation

Type that may hold the state information of a random seed for the jrand48 family of functionss.

Definition at line 65 of file par_sys_rand.h.

Type that may hold the state information of a random seed for integers of maximum width together with some padding to align it with seedmax64_t.

Definition at line 121 of file par_sys_rand.h.

Type that may hold the state information of a random seed for integers of maximum width together with some padding to align it with seedmax64_t.

Definition at line 130 of file par_sys_rand.h.

Definition at line 34 of file par_sys_semcond.h.

typedef struct sigaction par::sys::sigaction_struct

Definition at line 33 of file par_sys_signal.h.

typedef void(* par::sys::sighandler_t)(int s, siginfo_t *, void *)

Definition at line 31 of file par_sys_signal.h.

typedef ::_stat_struct par::sys::stat_struct

Definition at line 460 of file par_sys_fd.h.

The API of a random variate (= random generator).

Definition at line 160 of file par_sys_rand.h.


Enumeration Type Documentation

The names of the different random distributions that we handle.

Generally there are functions to compute a variate of such a distribution, prefixed with `drand' for real valued distributions and with `rand' for integer valued ones. In particular, there are par::sys::randUniform, par::sys::drandUniform, par::sys::drandNormal, par::sys::drandExponential, par::sys::drandGamma, par::sys::randBinomial, and par::sys::randHypergeometric. Most of these functions have particular calling conventions due to the different types of random events they model.

Enumerator:
fixed 
uniform 
normal 
exponential 
beta 
gamma 
binomial 
hypergeometric 
Poisson 

Definition at line 147 of file par_sys_rand.h.

The known POSIX resource types.

Enumerator:
rlimit_core  Limit on size of core dump file.
rlimit_cpu  Limit on CPU time per process.
rlimit_data  Limit on data segment size.
rlimit_fsize  Limit on file size.
rlimit_nofile  Limit on number of open files.
rlimit_stack  Limit on stack size.
rlimit_as  Limit on address space size.

Definition at line 40 of file par_sys_rusage.h.

Enumerator:
unshared 
thread_shared 
process_shared 
file_shared 
remote 

Definition at line 29 of file par_sys_sem.h.


Function Documentation

long par::sys::advisory_info ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 425 of file par_sys_sysconf.h.

long par::sys::aio_listio_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 396 of file par_sys_sysconf.h.

long par::sys::aio_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 397 of file par_sys_sysconf.h.

long par::sys::aio_prio_delta_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 398 of file par_sys_sysconf.h.

long par::sys::arg_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 399 of file par_sys_sysconf.h.

template<typename T >
void par::sys::assignCheck ( T *  a,
T const &  b,
T const *  low,
size_t  size 
) [inline]

Definition at line 57 of file par_sys_quicksort.h.

template<typename T >
void par::sys::assignCheck ( T *  a,
T const &  b,
T const *  low,
T const *  high 
) [inline]

long par::sys::asynchronous_io ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 427 of file par_sys_sysconf.h.

long par::sys::atexit_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 400 of file par_sys_sysconf.h.

long par::sys::barriers ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 426 of file par_sys_sysconf.h.

long par::sys::bc_base_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 401 of file par_sys_sysconf.h.

long par::sys::bc_dim_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 402 of file par_sys_sysconf.h.

long par::sys::bc_scale_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 403 of file par_sys_sysconf.h.

long par::sys::bc_string_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 404 of file par_sys_sysconf.h.

long par::sys::c_bind ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 494 of file par_sys_sysconf.h.

long par::sys::c_dev ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 495 of file par_sys_sysconf.h.

long par::sys::c_version ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 496 of file par_sys_sysconf.h.

long par::sys::char_term ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 497 of file par_sys_sysconf.h.

long par::sys::child_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 405 of file par_sys_sysconf.h.

template<class T >
void par::sys::choose ( par::sys::seed_t seed,
arrp[],
size_t  length,
size_t  amount 
) [inline]

Choose amount elements in arrp and move them to front.

After a call to par::sys::choose the first min(amount, length) elements in arrp are a randomly permuted choice of the the elements in arrp and the remaining part (if any) consists of the remaining elements. The order of the elements in this second part is not random.

Uses seed to generate min(amount, length) RN.

Definition at line 89 of file par_sys_permute.h.

template<typename T >
T par::sys::choosePrime ( n,
len,
seed_t &  seed 
) [inline]

Definition at line 274 of file par_sys_permrand.h.

template<typename T >
T par::sys::choosePrime ( n,
len 
) [inline]

Definition at line 266 of file par_sys_permrand.h.

template<class T >
size_t par::sys::cksum ( size_t  size,
T const *  seed 
) [inline]

Compute a checksum of the data that seed is pointing to.

Takes care of possible alignment issues.

Definition at line 758 of file par_sys_rand.h.

long par::sys::clk_tck ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 406 of file par_sys_sysconf.h.

long par::sys::clock_selection ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 428 of file par_sys_sysconf.h.

long par::sys::coll_weights_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 407 of file par_sys_sysconf.h.

long par::sys::cputime ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 429 of file par_sys_sysconf.h.

long par::sys::delaytimer_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 408 of file par_sys_sysconf.h.

double par::sys::drandBeta ( seed_t &  seed,
double  a,
double  b 
) [inline]

Return a random number that is distributed with a beta distribution of mean shape and variance shape.

Depending on the shape parameters a and its density has several different shapes. In particular it has poles if one of a or @ b is 1.0, and it is the uniform distribution if both are 1.0.

According to Devroye's book (with errata) this implements a combination of different algorithms depending on the shape parameters: Cheng's rejection algorithm, Cheng 1978, and Attkinson an Whittaker's first and second algorithm. The function itself is just wrapper to dispatch to the different cases and to allow for efficient constant expression elimination.

This implementation uses about 2.5 RN per call, and has a substantial overhead due to pow, log and sqrt evaluations.

Definition at line 143 of file par_sys_beta.h.

double par::sys::drandBetaAW1 ( seed_t &  seed,
double  a,
double  b,
double  t 
)

Internal for par::sys::drandBeta.

For internal use only.

double par::sys::drandBetaAW2 ( seed_t &  seed,
double  a,
double  b,
double  t 
)

Internal for par::sys::drandBeta.

For internal use only.

double par::sys::drandBetaCheng78 ( seed_t &  seed,
double  a,
double  b,
double  s,
double  lambda 
)

Internal for par::sys::drandBeta.

For internal use only.

double par::sys::drandBetaCheng78large ( seed_t &  seed,
double  a,
double  b 
) [inline]

Internal for par::sys::drandBeta.

For internal use only.

Definition at line 79 of file par_sys_beta.h.

double par::sys::drandBetaCheng78small ( seed_t &  seed,
double  a,
double  b 
) [inline]

Internal for par::sys::drandBeta.

For internal use only.

Definition at line 69 of file par_sys_beta.h.

double par::sys::drandBetaInner ( seed_t &  seed,
double  a,
double  b 
) [inline]

Internal for par::sys::drandBeta.

For internal use only.

Definition at line 99 of file par_sys_beta.h.

double par::sys::drandExponential ( seed_t &  seed,
double  mean 
) [inline]

Return a random number that is distributed with a exponential distribution of mean mean and standard deviation mean.

See par::sys::drandExponential(par::sys::seed_t&) for a complete description.

Definition at line 56 of file par_sys_exponential.h.

double par::sys::drandExponential ( seed_t &  seed  )  [inline]

Return a random number that is distributed with a exponential distribution of mean 1 and standard deviation 1.

Computed with George Marsaglia's ziggurat method.

On average, this uses about 1.03 RN per sample, which is comparable to par::sys::drandExponentialSlow. But nevertheless it is usually substantially faster (20% on my 1.6 GHz i386) than that because it avoids the evaluation of a log.

In has a memory overhead of 4 KiB for its tables, though. So under rare circumstances (memory intensive computation, tiny L1 data cache) you could try par::sys::drandExponentialSlow to see if it performs better.

Definition at line 45 of file par_sys_exponential.h.

double par::sys::drandExponentialSlow ( seed_t &  seed,
double  mean 
) [inline]

Return a random number that is distributed with a exponential distribution of mean mean and standard deviation mean.

See par::sys::drandExponentialSlow(par::sys::seed_t&) for a complete description.

Definition at line 83 of file par_sys_exponential.h.

double par::sys::drandExponentialSlow ( seed_t &  seed  )  [inline]

Return a random number that is distributed with a exponential distribution of mean 1 and standard deviation 1.

Computed by simpy applying a log to a uniform variate.

This uses 1 RN per sample. Usually par::sys::drandExponential is preferable, since it avoids the evaluation of the log function.

Definition at line 71 of file par_sys_exponential.h.

double par::sys::drandGamma ( seed_t &  seed,
double  shape,
double  scale 
) [inline]

Return a random number that is distributed with a gamma distribution of mean shape and variance shape * scale * scale.

See par::sys::drandGamma(seed_t&, double) for a complete description.

Definition at line 96 of file par_sys_gamma.h.

double par::sys::drandGamma ( seed_t &  seed,
double  shape 
) [inline]

Return a random number that is distributed with a gamma distribution of mean shape and variance shape.

Depending on the shape parameter its density has three different shapes: For shape < 1.0 it has a pole at 0.0, for shape == 1.0 it is the same as for the exponential distribution with a value of 1.0 at 0.0, and for shape > 1.0 it starts out with a value of 0.0.

According to Devroye's book (with errata) this implements Cheng's rejection algorithm, Cheng 1977, for shape > 1.0, and Berman's generator for shape < 1.0. For shape = 1.0 this simply returns an exponential variate.

On average, this implementation uses about 2.5 RN for shape > 1.0 and 3.5 RN for shape < 1.0, respectively. When it is called repeatedly with the same shape parameter the overhead per RN is dominated by 0.5 exp and log evaluations (for shape > 1.0) or 1 pow evaluation (for shape < 1.0).

Definition at line 49 of file par_sys_gamma.h.

double par::sys::drandNormal ( seed_t &  seed,
double  mean,
double  sdev 
) [inline]

Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean and standard deviation sdev.

See par::sys::drandNormal(par::sys::seed_t&) for a complete description.

Definition at line 65 of file par_sys_normal.h.

double par::sys::drandNormal ( seed_t &  seed,
double  mean 
) [inline]

Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean.

See par::sys::drandNormal(par::sys::seed_t&) for a complete description.

Definition at line 53 of file par_sys_normal.h.

double par::sys::drandNormal ( seed_t &  seed  )  [inline]

Return a random number that is distributed with a Gaussian (= normal) distribution of mean 0 and standard deviation 1.

Computed with George Marsaglia's ziggurat method.

On average, this uses about 1.04 RN per sample, so under most circumstances it should be preferable over par::sys::drandNormalSlow. In has a memory overhead of 4 KiB for its tables.

Definition at line 43 of file par_sys_normal.h.

void par::sys::drandNormal2 ( seed_t &  seed,
double &restrict  ran0,
double &restrict  ran1,
double  mean0,
double  mean1,
double  sdev0,
double  sdev1 
) [inline]

Definition at line 134 of file par_sys_normal.h.

void par::sys::drandNormal2 ( seed_t &  seed,
double &restrict  ran0,
double &restrict  ran1,
double  mean0,
double  mean1 
) [inline]

Definition at line 125 of file par_sys_normal.h.

void par::sys::drandNormal2 ( seed_t &  seed,
double &restrict  ran0,
double &restrict  ran1 
)

Return two indpendent random numbers that are distributed with a Gaussian (= normal) distribution of mean 0 and standard deviation 1.

More efficient than simply two calls to par::sys::drandNormalSlow but still a bit slower than par::sys::drandNormal, since it uses about 1.25 RN per sample.

Computed with George Marsaglia's polar method, a polar form of the Box-Muller transformation, see e.g http://www.taygeta.com/random/gaussian.html

Definition at line 55 of file par_sys_normal.cc.

double par::sys::drandNormalSlow ( seed_t &  seed,
double  mean,
double  sdev 
) [inline]

Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean and standard deviation sdev.

See par::sys::drandNormalSlow(par::sys::seed_t&) for a complete description.

Definition at line 102 of file par_sys_normal.h.

double par::sys::drandNormalSlow ( seed_t &  seed,
double  mean 
) [inline]

Return a random number that is distributed with a Gaussian (= normal) distribution of mean mean and standard deviation 1.

See par::sys::drandNormalSlow(par::sys::seed_t&) for a complete description.

Definition at line 90 of file par_sys_normal.h.

double par::sys::drandNormalSlow ( seed_t &  seed  ) 

Return a random number that is distributed with a Gaussian (= normal) distribution of mean 0 and standard deviation 1.

Computed with George Marsaglia's polar method, a polar form of the Box-Muller transformation, see e.g http://www.taygeta.com/random/gaussian.html

On average, this uses about 2.5 RN per sample, so under most circumstances par::sys::drandNormal should be preferable.

Definition at line 47 of file par_sys_normal.cc.

double par::sys::drandUniform ( seed_t &  seed,
double  right 
) [inline]

Return a random number that is distributed with a real valued uniform distribution in the interval [0.0, right).

Works also for the case that right < 0.0 in which case the interval is (right, 0.0].

Definition at line 67 of file par_sys_uniform.h.

double par::sys::drandUniform ( seed_t &  seed,
double  left,
double  right 
) [inline]

Return a random number that is distributed with a real valued uniform distribution in the interval [left, right).

Works also for the case that left > right in which case the interval is (right, left].

Definition at line 52 of file par_sys_uniform.h.

double par::sys::drandUniform ( seed_t &  seed  )  [inline]

Return a random number that is distributed with a real valued uniform distribution in the interval [0.0, 1.0).

In particular 0.0 may occur with the same frequency as other values, but 1.0 should not appear.

Definition at line 40 of file par_sys_uniform.h.

double par::sys::erand48 ( seed48_t &  seed  )  [inline]

Wrapper for the POSIX function erand48.

48 pseudo random bits are return in the double which is guaranteed to be in the range [0, 1).

Definition at line 469 of file par_sys_rand.h.

long par::sys::expr_nest_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 409 of file par_sys_sysconf.h.

long par::sys::file_locking ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 430 of file par_sys_sysconf.h.

par::cpp::format par::sys::format ( str &  f  ) 

Same as par::cpp::format.

Since par::sys::print is line-oriented, one line per thread, in addition this appends a newline to the format string.

Definition at line 21 of file par_sys_print.cc.

long par::sys::fort_dev ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 498 of file par_sys_sysconf.h.

long par::sys::fort_run ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 499 of file par_sys_sysconf.h.

long par::sys::fsync ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 431 of file par_sys_sysconf.h.

template<>
void par::sys::generate ( par::sys::seed_t seed,
long  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
ulong  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
unsigned  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
signed  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
short  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
ushort  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
schar  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
uchar  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<>
void par::sys::generate ( par::sys::seed_t seed,
bool  arrp[],
size_t  length,
unsigned  twist 
) [inline]

For internal use only.

template<class T >
void par::sys::generate ( par::sys::seed_t seed,
arrp[],
size_t  length,
unsigned  twist 
) [inline]

template<class T >
void par::sys::generate ( par::sys::seed_t seed,
arrp[],
size_t  length 
) [inline]

Definition at line 169 of file par_sys_permute.h.

size_t par::sys::get_prime ( void   ) 

Definition at line 21 of file par_sys_primes.cc.

long par::sys::getgr_r_size_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 415 of file par_sys_sysconf.h.

str par::sys::gethostname ( void   ) 

long par::sys::getpw_r_size_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 416 of file par_sys_sysconf.h.

long par::sys::host_name_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 410 of file par_sys_sysconf.h.

void par::sys::initenv ( void   ) 

long par::sys::iov_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 411 of file par_sys_sysconf.h.

long par::sys::ipv6 ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 432 of file par_sys_sysconf.h.

bool par::sys::isatty ( FILE *  F  )  [inline]

Definition at line 297 of file par_sys_error.h.

bool par::sys::isatty ( int  fd  )  [inline]

Definition at line 287 of file par_sys_error.h.

long par::sys::job_control ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 433 of file par_sys_sysconf.h.

long par::sys::jrand48 ( seed48_t &  seed  )  [inline]

Wrapper for the POSIX function jrand48.

32 pseudo random bits are returned in the long such that the result uniformly distributed over the interval [-2^31, 2^31).

On 64 bit architectures it is just a pity to loose the 16 bits compared to erand48. If you are interested in a large positive random number multiply the result of cast the result of jrand48 to ulong .

Definition at line 479 of file par_sys_rand.h.

void par::sys::lcong48 ( uint64_t  a,
uint16_t  b 
)

Definition at line 386 of file par_sys_rand.cc.

void par::sys::lcong48 ( seed48_t const &  X,
uint64_t  a,
uint16_t  b 
)

Definition at line 372 of file par_sys_rand.cc.

long par::sys::line_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 412 of file par_sys_sysconf.h.

long par::sys::localedef ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 500 of file par_sys_sysconf.h.

long par::sys::login_name_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 413 of file par_sys_sysconf.h.

long par::sys::mapped_files ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 434 of file par_sys_sysconf.h.

long par::sys::memlock ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 435 of file par_sys_sysconf.h.

long par::sys::memlock_range ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 436 of file par_sys_sysconf.h.

long par::sys::memory_protection ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 437 of file par_sys_sysconf.h.

long par::sys::message_passing ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 438 of file par_sys_sysconf.h.

long par::sys::monotonic_clock ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 439 of file par_sys_sysconf.h.

long par::sys::mq_open_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 417 of file par_sys_sysconf.h.

long par::sys::mq_prio_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 418 of file par_sys_sysconf.h.

template<typename T >
void par::sys::msync ( T const volatile *  addr  )  [inline]

Definition at line 576 of file par_sys_error.h.

template<typename T >
void par::sys::msync ( void const volatile *  addr  )  [inline]

void par::sys::msync ( void const volatile *  addr,
size_t  len 
)

Definition at line 668 of file par_sys_error.cc.

long par::sys::multi_process ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 440 of file par_sys_sysconf.h.

long par::sys::ngroups_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 414 of file par_sys_sysconf.h.

long par::sys::nrand48 ( seed48_t &  seed  )  [inline]

Wrapper for the POSIX function nrand48.

31 pseudo random bits are returned in the long such that the result uniformly distributed over the interval [0,2^31).

On 64 bit architectures it is just a pity to loose the one bit compared to jrand48. If you are just interested in a positive random number cast the result of jrand48 to ulong instead.

Definition at line 474 of file par_sys_rand.h.

uint64_t par::sys::nt ( void   ) 

The number of all parXXL processes that are POSIX threads in the same POSIX process.

Definition at line 121 of file par_sys_barrier.cc.

long par::sys::open_max ( void   )  [inline]

Interface to the dynamic POSIX feature.

Definition at line 424 of file par_sys_sysconf.h.

long par::sys::pagesize ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 479 of file par_sys_sysconf.h.

long par::sys::pbs ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 501 of file par_sys_sysconf.h.

long par::sys::pbs_accounting ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 502 of file par_sys_sysconf.h.

long par::sys::pbs_checkpoint ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 503 of file par_sys_sysconf.h.

long par::sys::pbs_locate ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 504 of file par_sys_sysconf.h.

long par::sys::pbs_message ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 505 of file par_sys_sysconf.h.

long par::sys::pbs_track ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 506 of file par_sys_sysconf.h.

long par::sys::posix1_version ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 473 of file par_sys_sysconf.h.

long par::sys::posix2_version ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 509 of file par_sys_sysconf.h.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2,
T3 const &  a3,
T4 const &  a4,
T5 const &  a5,
T6 const &  a6,
T7 const &  a7,
T8 const &  a8 
) [inline]

For internal use only.

Definition at line 387 of file par_sys_print.h.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2,
T3 const &  a3,
T4 const &  a4,
T5 const &  a5,
T6 const &  a6,
T7 const &  a7 
) [inline]

For internal use only.

Definition at line 359 of file par_sys_print.h.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2,
T3 const &  a3,
T4 const &  a4,
T5 const &  a5,
T6 const &  a6 
) [inline]

For internal use only.

Definition at line 333 of file par_sys_print.h.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2,
T3 const &  a3,
T4 const &  a4,
T5 const &  a5 
) [inline]

For internal use only.

Definition at line 309 of file par_sys_print.h.

template<typename T0 , typename T1 , typename T2 , typename T3 , typename T4 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2,
T3 const &  a3,
T4 const &  a4 
) [inline]

For internal use only.

Definition at line 287 of file par_sys_print.h.

template<typename T0 , typename T1 , typename T2 , typename T3 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2,
T3 const &  a3 
) [inline]

For internal use only.

Definition at line 268 of file par_sys_print.h.

template<typename T0 , typename T1 , typename T2 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1,
T2 const &  a2 
) [inline]

For internal use only.

Definition at line 251 of file par_sys_print.h.

template<typename T0 , typename T1 >
void par::sys::print ( FILE *  of,
T0 const &  a0,
T1 const &  a1 
) [inline]

For internal use only.

Definition at line 236 of file par_sys_print.h.

template<typename T >
void par::sys::print ( size_t  len,
FILE *  of,
T const *  o 
) [inline]

Print a vector o of length len as a comma seperated list to file of.

Definition at line 224 of file par_sys_print.h.

template<unsigned d>
void par::sys::print ( FILE *  of,
char const   o[d] 
) [inline]

Definition at line 215 of file par_sys_print.h.

template<typename T >
void par::sys::print ( FILE *  of,
T const &  o 
) [inline]

A wrapper that lifts the par::cpp::print interface to par::sys.

This here has the additional property that it is thread safe. Every print first reclaims a lock on of, does the printing and then releases the lock. So the output of different threads should not be mangled.

Definition at line 204 of file par_sys_print.h.

void par::sys::printenv ( FILE *  of  ) 

template<typename nat >
void par::sys::printSample ( nat(*)(seed_t &)  variate,
char const *  name,
nat const   left,
nat const   right,
size_t  steps,
seed_t seed 
) [inline]

Print a sample of a random variate variate to a file.

The file will contain steps pairs of values and relative occurences that is suitable to be plotted e.g by gnuplot. The file is named name with extension `.dat'.

left and right are the left and right endpoints to be sampled.

Definition at line 238 of file par_sys_rand.cc.

long par::sys::prioritized_io ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 441 of file par_sys_sysconf.h.

long par::sys::priority_scheduling ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 442 of file par_sys_sysconf.h.

long par::sys::pthread_destructor_iterations ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 480 of file par_sys_sysconf.h.

long par::sys::pthread_keys_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 481 of file par_sys_sysconf.h.

long par::sys::pthread_stack_min ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 482 of file par_sys_sysconf.h.

long par::sys::pthread_threads_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 483 of file par_sys_sysconf.h.

template<typename T >
void par::sys::qsort ( T *  Tp,
size_t  size 
) [inline]

A wrapper around the POSIX qsort function.

This interface merely exists for completion. POSIX qsort as a pure C function has a buildin problem concerning efficiency:

  • It passes the comparison function as a function pointer, so the comparison function can never be inlined into the sorting code.
  • It has no knowledge of the underlying data type, so it can not handle data items in registers if that is appropriate.

If you want a more efficient implementation of comparison sorting use par::sys::quicksort instead. This implementation here uses the template par::cpp::compare as a comparison function.

Definition at line 60 of file par_sys_qsort.h.

template<typename T >
void par::sys::qsort_1_ ( T *  Pt,
size_t  size 
) [inline]

Definition at line 67 of file par_sys_qsort.h.

template<class T >
void par::sys::quicksort ( T *  Pt,
size_t  size 
) [inline]

Comparison based sorting.

Uses par::cpp::less to do the comparison. Is the best sequential implementation of sorting we have so far.

This should be a version of quicksort that is relatively optimized. It is not the best possible sorting routine though, since we observe superlinear speedups with parXXL.

Its expected complexity is $L(\texttt{size}) = \log_2 /// \texttt{size}$ comparison and streaming operations. An optimal sorting algorithm would effect less streaming operations: it should be possible with almost linear amount of such operations when doing some multiway sorting.

Definition at line 45 of file par_sys_quicksort.h.

template<class T >
void par::sys::quicksort ( T *  Pt,
size_t  size,
par::sys::seed_t seed 
) [inline]

Definition at line 67 of file par_sys_quicksort.h.

template<typename T >
void par::sys::quicksort_1_ ( T *  Pt,
size_t  size 
) [inline]

Definition at line 50 of file par_sys_quicksort.h.

size_t par::sys::randBinomial ( seed_t seed,
size_t  trials,
double  prob 
)

Sample a draw of a binomial distribution.

This is an approximation for sampling the outcome of trials independent true/false random variables that all have the same probability prob of an outcome of true.

Parameters:
trials The number of independent trials that we would choose.
prob The probability of a positive outcome for each trial.

Definition at line 56 of file par_sys_binomial.cc.

template void par::sys::randHypergeom< unsigned int > ( par::sys::seed_t seed,
unsigned int  total,
unsigned int  whites,
size_t  draws,
unsigned int draw 
)

template<>
unsigned int par::sys::randHypergeom< unsigned int > ( par::sys::seed_t seed,
unsigned int  N,
unsigned int  M,
unsigned int  n 
) [inline]

template void par::sys::randHypergeom< unsigned long > ( par::sys::seed_t seed,
unsigned long  total,
unsigned long  whites,
size_t  draws,
unsigned long *  draw 
)

template<>
unsigned long par::sys::randHypergeom< unsigned long > ( par::sys::seed_t seed,
unsigned long  N,
unsigned long  M,
unsigned long  n 
) [inline]

template void par::sys::randHypergeom< unsigned short > ( par::sys::seed_t seed,
unsigned short  total,
unsigned short  whites,
size_t  draws,
unsigned short *  draw 
)

template<>
unsigned short par::sys::randHypergeom< unsigned short > ( par::sys::seed_t seed,
unsigned short  N,
unsigned short  M,
unsigned short  n 
) [inline]

template<class T >
void par::sys::randomSample ( size_t  n,
T *  A,
int  tag 
) [inline]

Definition at line 75 of file par_sys_sort.h.

size_t par::sys::randPoisson ( seed_t &  seed,
double  lambda 
)

Sample a draw of a Poisson distribution.

This samples the number of occurrences of independent events in a fixed time period.

Parameters:
lambda The expected number of events in the time period.

Definition at line 22 of file par_sys_Poisson.cc.

ssize_t par::sys::randUniform ( seed_t &  seed,
ssize_t  left,
ssize_t  right 
) [inline]

Return a random number that is distributed with a ssize_t valued uniform distribution in the interval [left, right).

Works also for the case that left > right in which case the interval is (right, left].

Definition at line 147 of file par_sys_uniform.h.

size_t par::sys::randUniform ( seed_t &  seed,
size_t  left,
size_t  right 
) [inline]

Return a random number that is distributed with a size_t valued uniform distribution in the interval [left, right).

Works also for the case that left > right in which case the interval is (right, left].

Definition at line 132 of file par_sys_uniform.h.

size_t par::sys::randUniform ( seed_t &  seed,
size_t  right 
) [inline]

Return a random number that is distributed with a size_t valued uniform distribution in the interval [0, right).

In particular 0 may occur with the same frequency as other values, but right should not appear.

Definition at line 120 of file par_sys_uniform.h.

long par::sys::raw_sockets ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 443 of file par_sys_sysconf.h.

long par::sys::re_dup_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 484 of file par_sys_sysconf.h.

void par::sys::read_dot ( par::cpp::edge< 2 > &  e,
char const *  s 
) throw (error)

Scan s for a `dot' description of an edge and store it in e.

Definition at line 21 of file par_sys_edge.cc.

long par::sys::reader_writer_locks ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 444 of file par_sys_sysconf.h.

long par::sys::realtime_signals ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 445 of file par_sys_sysconf.h.

long par::sys::regex_version ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 478 of file par_sys_sysconf.h.

long par::sys::regexp ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 446 of file par_sys_sysconf.h.

int par::sys::report ( char const *  format,
  ... 
)

int par::sys::report ( FILE *  os,
char const *  format,
  ... 
)

long par::sys::rtsig_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 485 of file par_sys_sysconf.h.

long par::sys::saved_ids ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 447 of file par_sys_sysconf.h.

double par::sys::seconds ( ::timespec const &  t  )  [inline]

Definition at line 66 of file par_sys_timespec.h.

long par::sys::sem_nsems_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 486 of file par_sys_sysconf.h.

long par::sys::sem_value_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 487 of file par_sys_sysconf.h.

long par::sys::semaphores ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 448 of file par_sys_sysconf.h.

timespec & par::sys::set ( ::timespec &  t,
double  other 
) [inline]

Definition at line 59 of file par_sys_timespec.h.

long par::sys::shared_memory_objects ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 449 of file par_sys_sysconf.h.

long par::sys::shell ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 450 of file par_sys_sysconf.h.

long par::sys::sigqueue_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 488 of file par_sys_sysconf.h.

void par::sys::sleepfor ( double  sec  ) 

Sleep for at least sec seconds.

Use this whenever your process has to take a nap for a certain amount of time. This function is signal safe: it is guaranteed not establish hidden signal handlers and it restarts sleeping for the remaining time if a signal (e.g IO event) arrives during the sleep.

Rounding errors due to the resolution of the clock and time spent in signal handlers may in fact increase the time that is slept for. So no guarantee for an upper bound on the effective sleep time can be given.

Definition at line 26 of file par_sys_timespec.cc.

long par::sys::spawn ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 451 of file par_sys_sysconf.h.

long par::sys::spin_locks ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 452 of file par_sys_sysconf.h.

long par::sys::sporadic_server ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 453 of file par_sys_sysconf.h.

par::sys::strtmp par::sys::sprintf ( char const *  format,
  ... 
)

Definition at line 130 of file par_sys_string.cc.

int par::sys::sputter ( FILE *  os,
char const *  head,
char const *  message 
)

For internal use only.

For internal use only.

sys::str par::sys::stamp ( void   ) 

Definition at line 43 of file par_sys_timespec.cc.

char * par::sys::strdup ( const char *  s1  )  [inline]

Definition at line 74 of file par_sys_string.h.

long par::sys::stream_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 489 of file par_sys_sysconf.h.

long par::sys::sw_dev ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 507 of file par_sys_sysconf.h.

long par::sys::symloop_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 454 of file par_sys_sysconf.h.

int par::sys::sync ( bool  firstTime = false  ) 

Synchronize all parXXL processes that share the same address space, i.e all threads.

Synchronize all parXXL processes that are POSIX threads in the same POSIX process.

To be able to synchronize, we first have to subscribe to this barrier. This is done by calling this function with an argument of true initially.

Returns:
As par::sys::barrier::sync this returns PTHREAD_BARRIER_SERIAL_THREAD for exactly one thread of the pack. When called with true as an argument (i.e during initialization) this is the very first thread that passed this point.

Definition at line 107 of file par_sys_barrier.cc.

long par::sys::synchronized_io ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 455 of file par_sys_sysconf.h.

long par::sys::thread_attr_stackaddr ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 456 of file par_sys_sysconf.h.

long par::sys::thread_attr_stacksize ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 457 of file par_sys_sysconf.h.

long par::sys::thread_cputime ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 458 of file par_sys_sysconf.h.

long par::sys::thread_prio_inherit ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 459 of file par_sys_sysconf.h.

long par::sys::thread_prio_protect ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 460 of file par_sys_sysconf.h.

long par::sys::thread_priority_scheduling ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 461 of file par_sys_sysconf.h.

long par::sys::thread_process_shared ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 462 of file par_sys_sysconf.h.

long par::sys::thread_safe_functions ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 463 of file par_sys_sysconf.h.

long par::sys::thread_sporadic_server ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 464 of file par_sys_sysconf.h.

long par::sys::threads ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 465 of file par_sys_sysconf.h.

void par::sys::throw_error ( char const *  st,
error::name  er = error::VALID 
) throw (par::sys::error)

long par::sys::timeouts ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 466 of file par_sys_sysconf.h.

long par::sys::timer_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 490 of file par_sys_sysconf.h.

long par::sys::timers ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 467 of file par_sys_sysconf.h.

long par::sys::trace ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 468 of file par_sys_sysconf.h.

int par::sys::trace ( char const *  name,
int  line 
)

int par::sys::trace ( char const *  name,
int  line,
FILE *  os,
char const *  format,
  ... 
)

int par::sys::trace ( char const *  name,
int  line,
char const *  format,
  ... 
)

long par::sys::trace_event_filter ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 469 of file par_sys_sysconf.h.

long par::sys::trace_inherit ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 470 of file par_sys_sysconf.h.

long par::sys::trace_log ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 471 of file par_sys_sysconf.h.

long par::sys::tty_name_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 491 of file par_sys_sysconf.h.

long par::sys::typed_memory_objects ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 472 of file par_sys_sysconf.h.

long par::sys::tzname_max ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 492 of file par_sys_sysconf.h.

long par::sys::upe ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 508 of file par_sys_sysconf.h.

long par::sys::v6_ilp32_off32 ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 474 of file par_sys_sysconf.h.

long par::sys::v6_ilp32_offbig ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 475 of file par_sys_sysconf.h.

long par::sys::v6_lp64_off64 ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 476 of file par_sys_sysconf.h.

long par::sys::v6_lpbig_offbig ( void   )  [inline]

Interface to the static POSIX feature.

Definition at line 477 of file par_sys_sysconf.h.

void size_t am() par::sys::void ( par::sys::rwlock::error   ) 

Definition at line 223 of file par_sys_fd_rawlock.h.

void par::sys::write_dot ( FILE *  f,
par::cpp::edge< 2 > const *  E,
size_t  length 
)

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

Definition at line 50 of file par_sys_edge.cc.

void par::sys::write_dot ( FILE *  f,
par::cpp::edge< 2 > const &  e 
)

Write a `dot' description of an edge e into f.

Definition at line 43 of file par_sys_edge.cc.


Variable Documentation

char const* const par::sys::alert[] = { "", "" } [static]

Definition at line 27 of file par_sys_error.h.

unsigned const par::sys::bits_per_rand48 = 32u

The amount of bits that we use per call of the rand48 series.

Definition at line 98 of file par_sys_rand.h.

Definition at line 99 of file par_sys_rand.h.

char const* const par::sys::clear[] = { "", "\r" } [static]

Definition at line 33 of file par_sys_error.h.

FILE * par::sys::dout = NULL

Debug output of par::sys.

Generally debug output of par::sys is directed to stderr. This may cause mangling of different streams coming from different POSIX processes and may, in extreme cases, even block execution. If this variable here is set to some FILE (and thus non-NULL) the output is redirected there, instead. Use this e.g in your par::cntrl::main with something like

to redirect par::sys output to the same FILE as par::cntrl output. With the option

 --logfile hui

to parXXLrun you may then redirect all that output to a series of files hui-*.log where * corresponds to the number of the parXXL process.

Definition at line 26 of file par_sys_print.cc.

Definition at line 426 of file par_sys_partition.h.

long const par::sys::jrand48_mask = (((1L << (bits_per_rand48 - 1u)) - 1L) << 1u) | 1L

Used to mask away unused bits in the result used from jrand48.

Definition at line 102 of file par_sys_rand.h.

par::sys::mutex const par::sys::mutex_initializer = { PTHREAD_MUTEX_INITIALIZER } [static]

Definition at line 520 of file par_sys_mutex.h.

char const* const par::sys::off[] = { "", "" } [static]

Definition at line 31 of file par_sys_error.h.

::pthread_cond_t const par::sys::pthread_cond_initializer = PTHREAD_COND_INITIALIZER

Definition at line 37 of file par_sys_cond.h.

pthread_mutex_t const par::sys::pthread_mutex_initializer = PTHREAD_MUTEX_INITIALIZER [static]

Definition at line 32 of file par_sys_mutex.h.

unsigned const par::sys::rand_max = sizeof(seedmax64_t) / sizeof(ushort)

The maximum number of ushort that we need for an integer of maximum width.

Definition at line 125 of file par_sys_rand.h.

char const* const par::sys::remark[] = { "", "" } [static]

Definition at line 29 of file par_sys_error.h.

bool par::sys::shutOff = false

Definition at line 27 of file par_sys_error.cc.

double const par::sys::theodorus = 1.7320508075688772935274463 [static]

Definition at line 27 of file par_sys_uniform.h.

Initial value:

 sizeof(_seedmax_t) % sizeof(uint64_t)
      ? (sizeof(_seedmax_t) / sizeof(uint64_t)) + 1
      : (sizeof(_seedmax_t) / sizeof(uint64_t))
The number of uint64_t that we need to cover all these rand_max seed48_t.

Definition at line 114 of file par_sys_rand.h.

unsigned const par::sys::ushort_per_seed48 = 3u

The amount of ushort that the underlying primitives use per seed.

Definition at line 61 of file par_sys_rand.h.


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