E.V.E
v2023.02.15
Loading...
Searching...
No Matches
Architecture related Types and Helpers

Detailed Description

Architecture related Types and Helpers.

This module defines the types and helpers functions to properly handle architecture specific components

Namespaces

namespace  platform
 Platform specific constexpr information.

Macros

#define EVE_ABI_NAMESPACE
 Expands to an identifier that is unique to the current compilation configuration.
#define EVE_NAMESPACE   namespace eve
 namespace eve::inline EVE_ABI_NAMESPACE.

Macro Definition Documentation

◆ EVE_ABI_NAMESPACE

#define EVE_ABI_NAMESPACE

Expands to an identifier that is unique to the current compilation configuration.

Defined in Header

#include <eve/module/core.hpp>

The identifier depends on the instruction sets and EVE options used to compile, for example abi_O for -march=haswell -DNDEBUG. It is kept short on purpose and is not meant to be read.

EVE uses it as the name of an inline namespace, so that multiple versions of the same code, compiled with different configurations, can be linked into one binary without causing ODR violations. ODR violations can still come from other namespaces, but EVE's own symbols mostly shouldn't cause them.

You can choose the name yourself by defining EVE_ABI_NAMESPACE before including EVE. If you give the same name to translation units compiled with different options, keeping them apart is then up to you.

To protect your own code that depends on compilation options in the same way, put it in an inline namespace named after the same macro:

namespace mylib::inline EVE_ABI_NAMESPACE
{
float sum(float const* data, std::size_t size);
}
#define EVE_ABI_NAMESPACE
Expands to an identifier that is unique to the current compilation configuration.
Definition abi_namespace.hpp:50

◆ EVE_NAMESPACE

#define EVE_NAMESPACE   namespace eve

namespace eve::inline EVE_ABI_NAMESPACE.

Defined in Header

#include <eve/module/core.hpp>