GADGET-4
dtypes.h File Reference

defines some custom data types used by the code More...

#include <stdint.h>
#include <cstddef>

Go to the source code of this file.

Classes

struct  offset_tuple
 
struct  location
 
struct  halotrees_table
 
struct  parttrees_table
 
struct  times_catalogue
 
class  peanokey
 
struct  data_partlist
 
struct  thread_data
 

Macros

#define POSITIONS_IN_32BIT
 
#define BITS_FOR_POSITIONS   32
 
#define IDS_32BIT
 
#define MPI_MYFLOAT   MPI_FLOAT
 
#define MPI_MYDOUBLE   MPI_FLOAT
 
#define H5T_NATIVE_MYFLOAT   H5T_NATIVE_FLOAT
 
#define H5T_NATIVE_MYDOUBLE   H5T_NATIVE_FLOAT
 
#define TIMEBINS   29
 
#define TIMEBASE   (1 << TIMEBINS)
 
#define NUMBER_OF_MPI_LISTENERS_PER_NODE   1
 
#define MAX_NUMBER_OF_RANKS_WITH_SHARED_MEMORY   64
 
#define LONG_X   1
 
#define MAX_LONG_X_BITS   0
 
#define LONG_Y   1
 
#define MAX_LONG_Y_BITS   0
 
#define LONG_Z   1
 
#define MAX_LONG_Z_BITS   0
 
#define LONG_BITS_MAX(A, B)   (((A) > (B)) ? (A) : (B))
 
#define LEVEL_ALWAYS_OPEN   LONG_BITS_MAX(MAX_LONG_X_BITS, LONG_BITS_MAX(MAX_LONG_Y_BITS, MAX_LONG_Z_BITS))
 
#define DBX   1
 
#define DBY   1
 
#define DBZ   1
 
#define DBX_EXTRA   0
 
#define DBY_EXTRA   0
 
#define DBZ_EXTRA   0
 

Typedefs

typedef uint32_t MyIntPosType
 
typedef int32_t MySignedIntPosType
 
typedef unsigned int MyIDType
 
typedef int MyLenType
 
typedef double MyReal
 
typedef float MyFloat
 
typedef float MyDouble
 
typedef float MyNgbTreeFloat
 
typedef int integertime
 
typedef uint64_t node_bit_field
 

Enumerations

enum  mysnaptype { NORMAL_SNAPSHOT , MOST_BOUND_PARTICLE_SNAPHOT , MOST_BOUND_PARTICLE_SNAPHOT_REORDERED }
 
enum  restart_options {
  RST_BEGIN , RST_RESUME , RST_STARTFROMSNAP , RST_FOF ,
  RST_POWERSPEC , RST_CONVERTSNAP , RST_CREATEICS , RST_CALCDESC ,
  RST_MAKETREES , RST_IOBANDWIDTH , RST_LCREARRANGE , RST_SNPREARRANGE
}
 

Functions

bool operator== (const location &left, const location &right)
 
bool operator!= (const location &left, const location &right)
 
bool operator< (const location &left, const location &right)
 
bool operator>= (const peanokey &a, const peanokey &b)
 
bool operator< (const peanokey &a, const peanokey &b)
 
peanokey operator+ (const peanokey &a, const peanokey &b)
 
peanokey get_peanokey_offset (unsigned int j, int bits)
 

Detailed Description

defines some custom data types used by the code

Definition in file dtypes.h.

Macro Definition Documentation

◆ BITS_FOR_POSITIONS

#define BITS_FOR_POSITIONS   32

Definition at line 37 of file dtypes.h.

◆ DBX

#define DBX   1

Definition at line 419 of file dtypes.h.

◆ DBX_EXTRA

#define DBX_EXTRA   0

Definition at line 422 of file dtypes.h.

◆ DBY

#define DBY   1

Definition at line 420 of file dtypes.h.

◆ DBY_EXTRA

#define DBY_EXTRA   0

Definition at line 423 of file dtypes.h.

◆ DBZ

#define DBZ   1

Definition at line 421 of file dtypes.h.

◆ DBZ_EXTRA

#define DBZ_EXTRA   0

Definition at line 424 of file dtypes.h.

◆ H5T_NATIVE_MYDOUBLE

#define H5T_NATIVE_MYDOUBLE   H5T_NATIVE_FLOAT

Definition at line 92 of file dtypes.h.

◆ H5T_NATIVE_MYFLOAT

#define H5T_NATIVE_MYFLOAT   H5T_NATIVE_FLOAT

Definition at line 91 of file dtypes.h.

◆ IDS_32BIT

#define IDS_32BIT

Definition at line 64 of file dtypes.h.

◆ LEVEL_ALWAYS_OPEN

Definition at line 383 of file dtypes.h.

◆ LONG_BITS_MAX

#define LONG_BITS_MAX (   A,
 
)    (((A) > (B)) ? (A) : (B))

Definition at line 381 of file dtypes.h.

◆ LONG_X

#define LONG_X   1

Definition at line 361 of file dtypes.h.

◆ LONG_Y

#define LONG_Y   1

Definition at line 369 of file dtypes.h.

◆ LONG_Z

#define LONG_Z   1

Definition at line 377 of file dtypes.h.

◆ MAX_LONG_X_BITS

#define MAX_LONG_X_BITS   0

Definition at line 362 of file dtypes.h.

◆ MAX_LONG_Y_BITS

#define MAX_LONG_Y_BITS   0

Definition at line 370 of file dtypes.h.

◆ MAX_LONG_Z_BITS

#define MAX_LONG_Z_BITS   0

Definition at line 378 of file dtypes.h.

◆ MAX_NUMBER_OF_RANKS_WITH_SHARED_MEMORY

#define MAX_NUMBER_OF_RANKS_WITH_SHARED_MEMORY   64

Definition at line 130 of file dtypes.h.

◆ MPI_MYDOUBLE

#define MPI_MYDOUBLE   MPI_FLOAT

Definition at line 90 of file dtypes.h.

◆ MPI_MYFLOAT

#define MPI_MYFLOAT   MPI_FLOAT

Definition at line 89 of file dtypes.h.

◆ NUMBER_OF_MPI_LISTENERS_PER_NODE

#define NUMBER_OF_MPI_LISTENERS_PER_NODE   1

Definition at line 126 of file dtypes.h.

◆ POSITIONS_IN_32BIT

#define POSITIONS_IN_32BIT

Definition at line 24 of file dtypes.h.

◆ TIMEBASE

#define TIMEBASE   (1 << TIMEBINS)

Definition at line 122 of file dtypes.h.

◆ TIMEBINS

#define TIMEBINS   29

Definition at line 121 of file dtypes.h.

Typedef Documentation

◆ integertime

typedef int integertime

Definition at line 120 of file dtypes.h.

◆ MyDouble

typedef float MyDouble

Definition at line 87 of file dtypes.h.

◆ MyFloat

typedef float MyFloat

Definition at line 86 of file dtypes.h.

◆ MyIDType

typedef unsigned int MyIDType

Definition at line 68 of file dtypes.h.

◆ MyIntPosType

typedef uint32_t MyIntPosType

Definition at line 35 of file dtypes.h.

◆ MyLenType

typedef int MyLenType

Definition at line 76 of file dtypes.h.

◆ MyNgbTreeFloat

typedef float MyNgbTreeFloat

Definition at line 88 of file dtypes.h.

◆ MyReal

typedef double MyReal

Definition at line 82 of file dtypes.h.

◆ MySignedIntPosType

typedef int32_t MySignedIntPosType

Definition at line 36 of file dtypes.h.

◆ node_bit_field

typedef uint64_t node_bit_field

Definition at line 136 of file dtypes.h.

Enumeration Type Documentation

◆ mysnaptype

enum mysnaptype
Enumerator
NORMAL_SNAPSHOT 
MOST_BOUND_PARTICLE_SNAPHOT 
MOST_BOUND_PARTICLE_SNAPHOT_REORDERED 

Definition at line 304 of file dtypes.h.

◆ restart_options

Enumerator
RST_BEGIN 
RST_RESUME 
RST_STARTFROMSNAP 
RST_FOF 
RST_POWERSPEC 
RST_CONVERTSNAP 
RST_CREATEICS 
RST_CALCDESC 
RST_MAKETREES 
RST_IOBANDWIDTH 
RST_LCREARRANGE 
RST_SNPREARRANGE 

Definition at line 311 of file dtypes.h.

Function Documentation

◆ get_peanokey_offset()

peanokey get_peanokey_offset ( unsigned int  j,
int  bits 
)
inline

Definition at line 270 of file dtypes.h.

◆ operator!=()

bool operator!= ( const location left,
const location right 
)
inline

Definition at line 170 of file dtypes.h.

◆ operator+()

peanokey operator+ ( const peanokey a,
const peanokey b 
)
inline

Definition at line 245 of file dtypes.h.

◆ operator<() [1/2]

bool operator< ( const location left,
const location right 
)
inline

Definition at line 172 of file dtypes.h.

◆ operator<() [2/2]

bool operator< ( const peanokey a,
const peanokey b 
)
inline

Definition at line 229 of file dtypes.h.

◆ operator==()

bool operator== ( const location left,
const location right 
)
inline

Definition at line 168 of file dtypes.h.

◆ operator>=()

bool operator>= ( const peanokey a,
const peanokey b 
)
inline

Definition at line 213 of file dtypes.h.