FML
|
Namespaces | |
namespace | CORRELATIONFUNCTIONS |
This namespace deals with computing correlations functions (N-point functions) in real and fourier space. | |
namespace | COSMOLOGY |
This namespace deals with various cosmology specific things: background evolution, perturbation theory, recombination history etc. | |
namespace | FILEUTILS |
This namespace deals with reading and writing files to disc. | |
namespace | FOF |
This namespace deals how to link together particles in groups. | |
namespace | GRID |
This namespace contains various grids for holding data shared across different tasks. | |
namespace | HESSIAN |
This namespace deals with computing the Hessian of a grid and related algorithms that rely on this. | |
namespace | INTERPOLATION |
This namespace deals with interpolation and density assignment. | |
namespace | MATH |
This namespace deals with special math functions and general math algorithms needed in the library. | |
namespace | NBODY |
This namespace deals with N-body simulations. | |
namespace | PARTICLE |
This namespace contains things related to particles: different types, containers for holding shared particles across tasks and algorithms for doing stuff with particles. | |
namespace | RANDOM |
This namespace deals with generating random numbers and random fields. | |
namespace | SOLVERS |
This nanespace contains various solvers. | |
namespace | SURVEY |
This namespace contains methods for dealing with surveys. | |
namespace | TRIANGULATION |
This namespace deals with performin triangulations (Delaunay and Voronoi) | |
namespace | UTILS |
This namespace contains useful things that don't fit anywhere else. | |
Data Structures | |
struct | FFTWSetup |
Singleton for initializing and cleaning up FFTW with MPI and threads automatically. More... | |
struct | FMLSetup |
Singleton for initializing and cleaning up FML Takes care of automatically initializing MPI and FFTW. More... | |
struct | LogAllocator |
Custom allocator that logs allocations. More... | |
class | MemoryLog |
Logs all heap allocations in the code that are larger than min_bytes_to_log. More... | |
struct | MPISetup |
Singleton for initializing and finalizing MPI automatically on startup and exit. More... | |
Typedefs | |
template<class T > | |
using | Allocator = FML::LogAllocator< T > |
template<class T > | |
using | Vector = std::vector< T, Allocator< T > > |
using | IndexIntType = long long int |
using | TimePoint = std::chrono::time_point< std::chrono::steady_clock > |
Functions | |
double | uniform_random () |
void | init_mpi (int *argc, char ***argv) |
Initialize MPI. More... | |
void | init_fml () |
Initialize the global variables within FML We here assume MPI has been initialized. More... | |
void | info () |
Show some info about FML. More... | |
void | abort_mpi (int exit_code) |
void | finalize_mpi () |
void | printf_mpi (const char *fmt,...) |
bool | create_folder (std::string foldername) |
std::pair< double, double > | get_system_memory_use () |
Fetch the resident set size currently and the peak value so far of it. More... | |
void | print_system_memory_use () |
Print the resident set size and the peak value of it so far. More... | |
TYPES (char) | |
TYPES (int) | |
TYPES (unsigned int) | |
TYPES (long long) | |
TYPES (size_t) | |
TYPES (ptrdiff_t) | |
TYPES (float) | |
TYPES (double) | |
TYPES (long double) | |
template<class T > | |
std::vector< T > | GatherFromTasks (T *value) |
Gather a single value from all tasks. Value from task ThisTask is stored in values[ThisTask]. More... | |
template<class T > | |
void | MaxOverTasks (T *value) |
Inplace max over tasks of a single value. More... | |
template<class T > | |
void | MinOverTasks (T *value) |
Inplace min over tasks of a single value. More... | |
template<class T > | |
void | SumOverTasks (T *value) |
Inplace sum over tasks of a single value. More... | |
template<class T > | |
void | SumArrayOverTasks (T *value, int n) |
Inplace sum over tasks of a contigious array of values. More... | |
constexpr void | __assert_mpi (const char *expr_str, bool expr, const char *file, int line, const char *msg) |
An assert function that calls MPI_Abort instead of just abort to avoid deadlock. More... | |
constexpr long long int | power (int base, int exponent) |
Simple integer a^b power-function by squaring. More... | |
OPS (+) OPS(-) OPS(*) OPS(/) OPS(+) OPS(-) OPS(*) OPS(/) OPS(+) OPS(-) OPS(*) OPS(/) template< class T > Vector< T > pow(const Vector< T > &x | |
Vector< T > | y (n) |
for (size_t i=0;i< n;i++) | |
template<typename T , typename U > | |
bool | operator== (const LogAllocator< T > &, const LogAllocator< U > &) |
template<typename T , typename U > | |
bool | operator!= (const LogAllocator< T > &a, const LogAllocator< U > &b) |
Variables | |
FML::UTILS::Timings | global_timer |
FMLSetup & | fmlsetup = FMLSetup::init() |
int | ThisTask = 0 |
The MPI task number. More... | |
int | NTasks = 1 |
Total number of MPI tasks. More... | |
int | NThreads = 1 |
Total number of threads availiable. More... | |
bool | FFTWThreadsOK = false |
bool | MPIThreadsOK = false |
If MPI and threads can work together with FFTW. More... | |
double | xmin_domain = 0.0 |
The local extent of the domain (global domain goes from 0 to 1) More... | |
double | xmax_domain = 1.0 |
The local extent of the domain (global domain goes from 0 to 1) More... | |
std::mt19937 | generator |
const double | exp |
return | y |
typedef std::allocator< T > FML::Allocator |
using FML::IndexIntType = typedef long long int |
using FML::TimePoint = typedef std::chrono::time_point<std::chrono::steady_clock> |
Definition at line 38 of file MemoryLogging.h.
using FML::Vector = typedef std::vector<T, Allocator<T> > |
|
constexpr |
An assert function that calls MPI_Abort instead of just abort to avoid deadlock.
Definition at line 172 of file Global.h.
void FML::abort_mpi | ( | int | exit_code | ) |
Definition at line 170 of file Global.cpp.
bool FML::create_folder | ( | std::string | foldername | ) |
Definition at line 207 of file Global.cpp.
void FML::finalize_mpi | ( | ) |
Definition at line 180 of file Global.cpp.
std::vector< T > FML::GatherFromTasks | ( | T * | value | ) |
Gather a single value from all tasks. Value from task ThisTask is stored in values[ThisTask].
Definition at line 109 of file Global.h.
std::pair< double, double > FML::get_system_memory_use | ( | ) |
Fetch the resident set size currently and the peak value so far of it.
Returns bytes
Definition at line 223 of file Global.cpp.
void FML::info | ( | ) |
Show some info about FML.
Definition at line 103 of file Global.cpp.
void FML::init_fml | ( | ) |
Initialize the global variables within FML We here assume MPI has been initialized.
Definition at line 71 of file Global.cpp.
void FML::init_mpi | ( | int * | argc, |
char *** | argv | ||
) |
Initialize MPI.
This function is automatically called unless NO_AUTO_MPI_SETUP is defined
Definition at line 55 of file Global.cpp.
void FML::MaxOverTasks | ( | T * | value | ) |
Inplace max over tasks of a single value.
Definition at line 121 of file Global.h.
void FML::MinOverTasks | ( | T * | value | ) |
Inplace min over tasks of a single value.
Definition at line 134 of file Global.h.
|
inline |
Definition at line 308 of file MemoryLogging.h.
|
inline |
Definition at line 303 of file MemoryLogging.h.
FML::OPS | ( | + | ) | const & |
|
constexpr |
Simple integer a^b power-function by squaring.
Definition at line 187 of file Global.h.
void FML::print_system_memory_use | ( | ) |
Print the resident set size and the peak value of it so far.
Definition at line 233 of file Global.cpp.
void FML::printf_mpi | ( | const char * | fmt, |
... | |||
) |
Definition at line 193 of file Global.cpp.
void FML::SumArrayOverTasks | ( | T * | value, |
int | n | ||
) |
Inplace sum over tasks of a contigious array of values.
Definition at line 160 of file Global.h.
void FML::SumOverTasks | ( | T * | value | ) |
Inplace sum over tasks of a single value.
Definition at line 147 of file Global.h.
FML::TYPES | ( | char | ) |
FML::TYPES | ( | double | ) |
FML::TYPES | ( | float | ) |
FML::TYPES | ( | int | ) |
FML::TYPES | ( | long double | ) |
FML::TYPES | ( | long long | ) |
FML::TYPES | ( | ptrdiff_t | ) |
FML::TYPES | ( | size_t | ) |
FML::TYPES | ( | unsigned int | ) |
auto FML::uniform_random | ( | ) |
Definition at line 46 of file Global.cpp.
Vector< T > FML::y | ( | n | ) |
const double FML::exp |
bool FML::FFTWThreadsOK = false |
Definition at line 37 of file Global.cpp.
FMLSetup& FML::fmlsetup = FMLSetup::init() |
Definition at line 24 of file Global.cpp.
std::mt19937 FML::generator |
Definition at line 45 of file Global.cpp.
FML::UTILS::Timings FML::global_timer |
Definition at line 18 of file Global.cpp.
bool FML::MPIThreadsOK = false |
If MPI and threads can work together with FFTW.
Definition at line 38 of file Global.cpp.
int FML::NTasks = 1 |
Total number of MPI tasks.
Definition at line 34 of file Global.cpp.
int FML::NThreads = 1 |
Total number of threads availiable.
Definition at line 35 of file Global.cpp.
int FML::ThisTask = 0 |
The MPI task number.
Definition at line 33 of file Global.cpp.
double FML::xmax_domain = 1.0 |
The local extent of the domain (global domain goes from 0 to 1)
Definition at line 42 of file Global.cpp.
double FML::xmin_domain = 0.0 |
The local extent of the domain (global domain goes from 0 to 1)
Definition at line 41 of file Global.cpp.