GADGET-4
system.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * \copyright This file is part of the GADGET4 N-body/SPH code developed
3  * \copyright by Volker Springel. Copyright (C) 2014-2020 by Volker Springel
4  * \copyright (vspringel@mpa-garching.mpg.de) and all contributing authors.
5  *******************************************************************************/
6 
12 #ifndef SYSTEM_H
13 #define SYSTEM_H
14 
15 #include <gsl/gsl_rng.h>
16 #include <stdio.h>
17 
18 extern gsl_rng *random_generator;
20 void myflush(FILE *fstream);
21 
23 
24 void permutate_chunks_in_list(int ncount, int *list);
25 
26 void subdivide_evenly(long long N, int pieces, int index_bin, long long *first, int *count);
27 void subdivide_evenly(int N, int pieces, int index, int *first, int *count);
28 void subdivide_evenly_get_bin(int N, int pieces, int index, int *bin);
29 
30 void init_rng(int thistask);
31 double get_random_number(void);
32 
33 int my_fls(unsigned int x);
34 
35 template <typename T>
36 inline T square(T const value)
37 {
38  return value * value;
39 }
40 
41 #endif
void subdivide_evenly_get_bin(int N, int pieces, int index, int *bin)
Definition: system.cc:70
void permutate_chunks_in_list(int ncount, int *list)
Definition: system.cc:81
void enable_core_dumps_and_fpu_exceptions(void)
gsl_rng * random_generator
Definition: system.cc:40
int my_fls(unsigned int x)
Definition: system.cc:316
void subdivide_evenly(long long N, int pieces, int index_bin, long long *first, int *count)
Definition: system.cc:51
void init_rng(int thistask)
Definition: system.cc:42
void myflush(FILE *fstream)
Definition: system.cc:125
T square(T const value)
Definition: system.h:36
double get_random_number(void)
Definition: system.cc:49