From 126475e7d2a839fd1c7f8c0630c94aea7492bec9 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Wed, 31 Aug 2022 12:26:14 +0200 Subject: [PATCH] feat(tools): Add macro to instruct the compiler to always inline --- fairmq/CMakeLists.txt | 1 + fairmq/Tools.h | 3 ++- fairmq/tools/Compiler.h | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 fairmq/tools/Compiler.h diff --git a/fairmq/CMakeLists.txt b/fairmq/CMakeLists.txt index 090267d2..caa76ad5 100644 --- a/fairmq/CMakeLists.txt +++ b/fairmq/CMakeLists.txt @@ -71,6 +71,7 @@ if(BUILD_FAIRMQ) shmem/Monitor.h shmem/Segment.h shmem/UnmanagedRegion.h + tools/Compiler.h tools/CppSTL.h tools/Exceptions.h tools/IO.h diff --git a/fairmq/Tools.h b/fairmq/Tools.h index 78191869..36f5770f 100644 --- a/fairmq/Tools.h +++ b/fairmq/Tools.h @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (C) 2017-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * + * Copyright (C) 2017-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * * * This software is distributed under the terms of the * * GNU Lesser General Public Licence (LGPL) version 3, * @@ -10,6 +10,7 @@ #define FAIR_MQ_TOOLS_H // IWYU pragma: begin_exports +#include #include #include #include diff --git a/fairmq/tools/Compiler.h b/fairmq/tools/Compiler.h new file mode 100644 index 00000000..e9627d27 --- /dev/null +++ b/fairmq/tools/Compiler.h @@ -0,0 +1,14 @@ +/******************************************************************************** + * Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * + * * + * This software is distributed under the terms of the * + * GNU Lesser General Public Licence (LGPL) version 3, * + * copied verbatim in the file "LICENSE" * + ********************************************************************************/ + +#ifndef FAIR_MQ_TOOLS_COMPILER_H +#define FAIR_MQ_TOOLS_COMPILER_H + +#define __FAIRMQ_ALWAYS_INLINE __attribute__((always_inline)) inline + +#endif /* FAIR_MQ_TOOLS_COMPILER_H */