VTK-m  2.1
Macros
Configure.h File Reference
#include <cctype>

Go to the source code of this file.

Macros

#define VTKM_NO_ASSERT_CUDA
 
#define VTKM_NO_ASSERT_HIP
 
#define VTKM_USE_64BIT_IDS
 
#define VTKM_SIZE_LONG   8
 
#define VTKM_SIZE_LONG_LONG   8
 
#define VTKM_ALLOCATION_ALIGNMENT   64
 
#define VTKM_THIRDPARTY_PRE_INCLUDE
 
#define VTKM_THIRDPARTY_POST_INCLUDE
 
#define VTKM_VECTORIZATION_PRE_LOOP
 
#define VTKM_VECTORIZATION_IN_LOOP
 
#define VTKM_ENABLE_TBB
 
#define VTKM_ENABLE_OPENMP
 
#define VTKM_ENABLE_MPI
 
#define VTKM_ENABLE_LOGGING
 
#define VTKM_SWALLOW_SEMICOLON_PRE_BLOCK   do
 
#define VTKM_SWALLOW_SEMICOLON_POST_BLOCK   while (false)
 
#define VTKM_PASS_COMMAS(...)   __VA_ARGS__
 
#define VTKM_EXPAND(expr)   expr
 
#define VTKM_FALLTHROUGH   ((void)0)
 

Macro Definition Documentation

◆ VTKM_ALLOCATION_ALIGNMENT

#define VTKM_ALLOCATION_ALIGNMENT   64

◆ VTKM_ENABLE_LOGGING

#define VTKM_ENABLE_LOGGING

◆ VTKM_ENABLE_MPI

#define VTKM_ENABLE_MPI

◆ VTKM_ENABLE_OPENMP

#define VTKM_ENABLE_OPENMP

◆ VTKM_ENABLE_TBB

#define VTKM_ENABLE_TBB

◆ VTKM_EXPAND

#define VTKM_EXPAND (   expr)    expr

A utility macro to expand the arguments of macro before invoking it in the preprocessor. This is mostly used to handle the __VA_ARGS__ created for variadic preprocessor macros. Often you will have to pass __VA_ARGS__ to another macro to tease out particular parameters. For example, to get the first argument, you might make something like this.

#define GET_FIRST_ARGUMENT(...) GET_FIRST_ARGUMENT_IMPL(__VA_ARGS__, no_arg)
#define GET_FIRST_ARGUMENT_IMPL(first, ...) first

You would expect this pair of macros to give you the first argument or the token no_arg if no arguments were given, and for most compilers that is what you would get. But Visual Studio in particular has a weird interpretation of the standard that causes __VA_ARGS__ to be treated as a single argument when passed to another macro. Consequently, for the example above, Visual Studio actually returns all args passed instead of the first. To get around the problem, you can wrap the entire call to the secondary macro in VTKM_EXPAND to get Visual Studio (and all other compilers) to properly treat __VA_ARGS__ as separate arguments.

#define GET_FIRST_ARGUMENT(...) VTKM_EXPAND(GET_FIRST_ARGUMENT_IMPL(__VA_ARGS__, no_arg))
#define GET_FIRST_ARGUMENT_IMPL(first, ...) first

◆ VTKM_FALLTHROUGH

#define VTKM_FALLTHROUGH   ((void)0)

◆ VTKM_NO_ASSERT_CUDA

#define VTKM_NO_ASSERT_CUDA

◆ VTKM_NO_ASSERT_HIP

#define VTKM_NO_ASSERT_HIP

◆ VTKM_PASS_COMMAS

#define VTKM_PASS_COMMAS (   ...)    __VA_ARGS__

A trick to pass arguments containing commas through a macro. This is helpful for mixing template code with macros.

See https://stackoverflow.com/questions/13842468

◆ VTKM_SIZE_LONG

#define VTKM_SIZE_LONG   8

◆ VTKM_SIZE_LONG_LONG

#define VTKM_SIZE_LONG_LONG   8

◆ VTKM_SWALLOW_SEMICOLON_POST_BLOCK

#define VTKM_SWALLOW_SEMICOLON_POST_BLOCK   while (false)

◆ VTKM_SWALLOW_SEMICOLON_PRE_BLOCK

#define VTKM_SWALLOW_SEMICOLON_PRE_BLOCK   do

◆ VTKM_THIRDPARTY_POST_INCLUDE

#define VTKM_THIRDPARTY_POST_INCLUDE

◆ VTKM_THIRDPARTY_PRE_INCLUDE

#define VTKM_THIRDPARTY_PRE_INCLUDE

◆ VTKM_USE_64BIT_IDS

#define VTKM_USE_64BIT_IDS

◆ VTKM_VECTORIZATION_IN_LOOP

#define VTKM_VECTORIZATION_IN_LOOP

◆ VTKM_VECTORIZATION_PRE_LOOP

#define VTKM_VECTORIZATION_PRE_LOOP