GEOSX
Macros
GeosxMacros.hpp File Reference
#include "common/GeosxConfig.hpp"
#include "LvArray/src/Macros.hpp"

Go to the source code of this file.

Macros

#define PRAGMA_OMP(clause)
 No-op version of PRAGMA_OMP.
 
#define GEOS_RESTRICT   LVARRAY_RESTRICT
 preprocessor variable for the C99 restrict keyword for use with pointers
 
#define GEOS_RESTRICT_THIS   LVARRAY_RESTRICT_THIS
 preprocessor variable for the C99 restrict keyword for use with the "this" pointer
 
#define GEOS_DECLTYPE_AUTO_RETURN   decltype( auto )
 Doxygen can't parse a decltype( auto ) return type, using this gets around that.
 
#define GEOS_CONCAT_IMPL(A, B)   A ## B
 Macro to concatenate two tokens (low level)
 
#define GEOS_CONCAT(A, B)   GEOS_CONCAT_IMPL( A, B )
 Macro to concatenate two tokens (user level)
 
#define GEOS_MAYBE_UNUSED
 [[maybe_unused]] when >= C++17, or compiler-specific implementations when < C++17
 
Host-device markers

These macros are used to denote host/device/inline functions in a compiler-specific way. They must be prepended to a function or lambda declaration/definition. They will be defined differently when compiled by e.g. a CUDA compiler.

#define GEOS_HOST
 Marks a host-only function.
 
#define GEOS_DEVICE
 Marks a device-only function.
 
#define GEOS_HOST_DEVICE
 Marks a host-device function.
 
#define GEOS_FORCE_INLINE   inline
 Marks a function or lambda for inlining.
 
#define PRAGMA_UNROLL
 Compiler directive specifying to unroll the loop.
 

Unused variable markers.

These macros are used to explicitly mark a variable/argument as unused and thus silence compiler warnings.

#define GEOS_UNUSED_PARAM(X)
 Mark an unused argument and silence compiler warnings.
 
#define GEOS_UNUSED_VAR(...)   i_g_n_o_r_e( __VA_ARGS__ )
 Mark an unused variable and silence compiler warnings.
 
#define GEOS_DEBUG_VAR(...)   GEOS_UNUSED_VAR( __VA_ARGS__ )
 Mark a debug variable and silence compiler warnings.
 
template<typename ... ARGS>
constexpr void i_g_n_o_r_e (ARGS const &...)
 Used to silence unused variable warnings, cuda doesn't respect casting to void. More...
 

Detailed Description

This file contains various macro definitions.

Definition in file GeosxMacros.hpp.

Function Documentation

◆ i_g_n_o_r_e()

template<typename ... ARGS>
constexpr void i_g_n_o_r_e ( ARGS const &  ...)
inlineconstexpr

Used to silence unused variable warnings, cuda doesn't respect casting to void.

Template Parameters
ARGSargument types
Parameters
...

Definition at line 80 of file GeosxMacros.hpp.