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

typedef std::size_t tsize

unsigned integer type which should be used for array sizes

Definition at line 116 of file datatypes.h.

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

enum PDT

mapping of Planck data types to integer constants

Definition at line 121 of file datatypes.h.

enum NDT

mapping of "native" data types to integer constants

Definition at line 249 of file datatypes.h.


Function Documentation

template<typename T>
PDT planckType (  )  [inline]

Returns the PDT constant associated with T.

Definition at line 137 of file datatypes.h.

int type2size ( PDT  type  )  [inline]

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

Definition at line 153 of file datatypes.h.

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

Converts the string type to a PDT.

Definition at line 175 of file datatypes.h.

const char* type2string ( PDT  type  )  [inline]

Converts the Planck data type type to a C string.

Definition at line 193 of file datatypes.h.

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

Returns a C string describing the data type T.

Definition at line 215 of file datatypes.h.

template<typename T>
NDT nativeType (  )  [inline]

Returns the NDT constant associated with T.

Definition at line 270 of file datatypes.h.

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 Thu Oct 8 14:48:51 2015 for LevelS C++ support library