GADGET-4
system.cc File Reference

various low level helper routines More...

#include "gadgetconfig.h"
#include <gsl/gsl_rng.h>
#include <math.h>
#include <mpi.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/resource.h>
#include <sys/statvfs.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include "../data/allvars.h"
#include "../data/dtypes.h"
#include "../data/mymalloc.h"
#include "../io/io.h"
#include "../logs/logs.h"
#include "../main/main.h"
#include "../main/simulation.h"
#include "../mpi_utils/mpi_utils.h"
#include "../system/system.h"

Go to the source code of this file.

Macros

#define WALK_N_PIECES   32
 
#define WALK_N_SIZE   500
 

Functions

void init_rng (int thistask)
 
double get_random_number (void)
 
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_bin, int *first, int *count)
 
void subdivide_evenly_get_bin (int N, int pieces, int index, int *bin)
 
void permutate_chunks_in_list (int ncount, int *list)
 
void myflush (FILE *fstream)
 
int my_fls (unsigned int x)
 

Variables

gsl_rng * random_generator
 

Detailed Description

various low level helper routines

Definition in file system.cc.

Macro Definition Documentation

◆ WALK_N_PIECES

#define WALK_N_PIECES   32

◆ WALK_N_SIZE

#define WALK_N_SIZE   500

Function Documentation

◆ 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.

◆ subdivide_evenly() [1/2]

void subdivide_evenly ( int  N,
int  pieces,
int  index_bin,
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

the random number generator used

Definition at line 40 of file system.cc.