Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Typedefs | Functions
basedefinitions.h File Reference
#include <stdint.h>
#include <cinttypes>
#include <cstddef>
+ Include dependency graph for basedefinitions.h:
+ This graph shows which files directly or indirectly include this file:

Description

Basic types and macros used throughout GROMACS.

Macros

#define FALSE   false
 False value for gmx_bool. More...
 
#define TRUE   true
 True value for gmx_bool. More...
 
#define BOOL_NR   2
 Number of gmx_bool values. More...
 
#define gmx_restrict   __restrict
 Keyword to use in instead of C99 restrict. More...
 
#define gmx_unused
 Attribute to suppress compiler warnings about unused function parameters. More...
 
#define gmx_used_in_debug
 Attribute to explicitly indicate that a parameter or locally scoped variable is used just in debug mode.
 
#define __has_feature(x)   0
 For compatibility with non-clang compilers. More...
 
#define GMX_UNUSED_VALUE(value)   (void)value
 Macro to explicitly ignore an unused value. More...
 
#define CLANG_DIAGNOSTIC_IGNORE(warning)
 Ignore specified clang warning until CLANG_DIAGNOSTIC_RESET.
 
#define CLANG_DIAGNOSTIC_RESET
 Reset all diagnostics to default.
 
#define MSVC_DIAGNOSTIC_IGNORE(warning)
 Ignore specified MSVC warning until MSVC_DIAGNOSTIC_RESET.
 
#define MSVC_DIAGNOSTIC_RESET
 Reset all diagnostics to default.
 
#define GMX_IGNORE_RETURN_VALUE(call)   ::gmx::internal::ignoreValueHelper(call)
 Macro to explicitly ignore a return value of a call. More...
 

Typedefs

typedef bool gmx_bool
 Identical to bool.
 
using gmx::index = std::ptrdiff_t
 Integer type for indexing into arrays or vectors. More...
 

Functions

template<typename T >
index gmx::ssize (const T &t)
 Return signed size of container.
 
template<typename T >
static void gmx::internal::ignoreValueHelper (const T &)
 Helper for ignoring values in macros. More...
 

Macro Definition Documentation

#define __has_feature (   x)    0

For compatibility with non-clang compilers.

#define BOOL_NR   2

Number of gmx_bool values.

#define FALSE   false

False value for gmx_bool.

#define gmx_restrict   __restrict

Keyword to use in instead of C99 restrict.

We cannot use restrict because it is only in C99, but not in C++. This macro should instead be used to allow easily supporting different compilers.

#define gmx_unused

Attribute to suppress compiler warnings about unused function parameters.

This attribute suppresses compiler warnings about unused function arguments by marking them as possibly unused. Some arguments are unused but have to be retained to preserve a function signature that must match that of another function. Some arguments are only used in some conditional compilation code paths (e.g. MPI).

#define TRUE   true

True value for gmx_bool.