feat(tools): Add macro to instruct the compiler to always inline

This commit is contained in:
Dennis Klein 2022-08-31 12:26:14 +02:00 committed by Alexey Rybalchenko
parent 0e12c57ff0
commit 126475e7d2
3 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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 <fairmq/tools/Compiler.h>
#include <fairmq/tools/CppSTL.h>
#include <fairmq/tools/Exceptions.h>
#include <fairmq/tools/InstanceLimit.h>

14
fairmq/tools/Compiler.h Normal file
View File

@ -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 */