GADGET-4
system.h File Reference

declares functions for various low level helper routines More...

#include <gsl/gsl_rng.h>
#include <stdio.h>

Go to the source code of this file.

Functions

void myflush (FILE *fstream)
 
void enable_core_dumps_and_fpu_exceptions (void)
 
void permutate_chunks_in_list (int ncount, int *list)
 
void subdivide_evenly (long long N, int pieces, int index_bin, long long *first, int *count)
 
void subdivide_evenly (int N, int pieces, int index, int *first, int *count)
 
void subdivide_evenly_get_bin (int N, int pieces, int index, int *bin)
 
void init_rng (int thistask)
 
double get_random_number (void)
 
int my_fls (unsigned int x)
 
template<typename T >
square (T const value)
 

Variables

gsl_rng * random_generator
 

Detailed Description

declares functions for various low level helper routines

Definition in file system.h.

Function Documentation

◆ enable_core_dumps_and_fpu_exceptions()

void enable_core_dumps_and_fpu_exceptions ( void  )

◆ get_random_number()

double get_random_number ( void  )

Definition at line 49 of file system.cc.

◆ init_rng()

void init_rng ( int  thistask)

Definition at line 42 of file system.cc.

◆ my_fls()

int my_fls ( unsigned int  x)

Definition at line 316 of file system.cc.

◆ myflush()

void myflush ( FILE *  fstream)

Definition at line 125 of file system.cc.

◆ permutate_chunks_in_list()

void permutate_chunks_in_list ( int  ncount,
int *  list 
)

< Number of chunk sets used

< Size of each chunk

< Chunk set currently processed

Definition at line 81 of file system.cc.

◆ square()

T square ( T const  value)
inline

Definition at line 36 of file system.h.

◆ subdivide_evenly() [1/2]

void subdivide_evenly ( int  N,
int  pieces,
int  index,
int *  first,
int *  count 
)

Definition at line 62 of file system.cc.

◆ subdivide_evenly() [2/2]

void subdivide_evenly ( long long  N,
int  pieces,
int  index_bin,
long long *  first,
int *  count 
)

Definition at line 51 of file system.cc.

◆ subdivide_evenly_get_bin()

void subdivide_evenly_get_bin ( int  N,
int  pieces,
int  index,
int *  bin 
)

Definition at line 70 of file system.cc.

Variable Documentation

◆ random_generator

gsl_rng* random_generator
extern

the random number generator used

Definition at line 40 of file system.cc.