LevelS C++ support library  3.83
Typedefs | Enumerations | Functions
datatypes.h File Reference
#include <string>
#include <cstddef>
#include "xcomplex.h"
#include "error_handling.h"

Go to the source code of this file.

Typedefs

typedef std::size_t tsize
 
typedef std::ptrdiff_t tdiff
 

Enumerations

enum  PDT
 
enum  NDT
 

Functions

template<typename T >
PDT planckType ()
 
int type2size (PDT type)
 
PDT string2type (const std::string &type)
 
const char * type2string (PDT type)
 
template<typename T >
const char * type2typename ()
 
template<typename T >
NDT nativeType ()
 
int ndt2size (NDT type)
 

Detailed Description

This file defines various platform-independent data types. If any of the requested types is not available, compilation aborts with an error (unfortunately a rather obscure one).

Copyright (C) 2004-2015 Max-Planck-Society

Author
Martin Reinecke

Definition in file datatypes.h.

Typedef Documentation

◆ tsize

typedef std::size_t tsize

unsigned integer type which should be used for array sizes

Definition at line 116 of file datatypes.h.

◆ tdiff

typedef std::ptrdiff_t tdiff

signed integer type which should be used for relative array indices

Definition at line 118 of file datatypes.h.

Enumeration Type Documentation

◆ PDT

enum PDT

mapping of Planck data types to integer constants

Definition at line 121 of file datatypes.h.

◆ NDT

enum NDT

mapping of "native" data types to integer constants

Definition at line 249 of file datatypes.h.

Function Documentation

◆ planckType()

template<typename T >
PDT planckType ( )
inline

Returns the PDT constant associated with T.

Definition at line 137 of file datatypes.h.

◆ type2size()

int type2size ( PDT  type)
inline

Returns the size (in bytes) of the Planck data type type.

Definition at line 153 of file datatypes.h.

◆ string2type()

PDT string2type ( const std::string &  type)
inline

Converts the string type to a PDT.

Definition at line 175 of file datatypes.h.

◆ type2string()

const char* type2string ( PDT  type)
inline

Converts the Planck data type type to a C string.

Definition at line 193 of file datatypes.h.

◆ type2typename()

template<typename T >
const char* type2typename ( )
inline

Returns a C string describing the data type T.

Definition at line 215 of file datatypes.h.

◆ nativeType()

template<typename T >
NDT nativeType ( )
inline

Returns the NDT constant associated with T.

Definition at line 270 of file datatypes.h.

◆ ndt2size()

int ndt2size ( NDT  type)
inline

Returns the size (in bytes) of the native data type type.

Definition at line 292 of file datatypes.h.


Generated on Wed Nov 13 2024 12:18:16 for LevelS C++ support library