Last commit for global.h: 826fd4b5e0c6c98a6ff5f960afbfc81e235e4dbb

made macros and ternary operators better

Ramses van Zon [2018-03-27 22:49:55]
made macros and ternary operators better
/* a few global setting for all of pardy */
#ifndef GLOBALH
#define GLOBALH
/* global_rank and global_size should be set, once, at the start of main. */
extern int global_size;
extern int global_rank;
#define global_root 0
#define i_am_root (global_rank == 0)
#define DIM 3
typedef signed char tiny_int;

/**
 * Helper function to find maximum of three double precision numbers
*/
static inline double max3(double x1, double x2, double x3)
{
    double m12 = ((x1>x2) ? x1 : x2);
    return ((m12>x3) ? m12 : x3);
}
#endif
ViewGit