SeqAn3 3.4.0-rc.3
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
new
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
5/*!\file
6 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
7 * \author Rene Rahn <rene.rahn AT fu-berlin.de>
8 */
9
10// File might be included from multiple libraries.
11#ifndef SEQAN_STD_NEW_SHIM
12#define SEQAN_STD_NEW_SHIM
13
14#include <new>
15
16#ifndef __cpp_lib_hardware_interference_size
17
18/*!\defgroup std std
19 * \brief A subset of the C++20 standard library made available in pre-C++20 contexts.
20 *
21 * \details
22 *
23 * This module provides many parts of the C++20 standard library (and some parts of the C++17 standard library
24 * not available in GCC). They are only defined if not found in the compiler's standard library and are called exactly
25 * like the originals so they can be used interchangeably.
26 *
27 * \attention All of this sub-module is subject to change!
28 *
29 * In particular:
30 *
31 * * We do not provide all C++20 library features, only those that are used by SeqAn.
32 * * All of these might change or be removed once C++20 is published.
33 * * The documentation of this module will likely be removed entirely in favour of links to
34 * https://en.cppreference.com
35 *
36 * It is best you consider every entity in this module as:
37 *
38 * \noapi
39 *
40 */
41
42/*!\defgroup std_new new
43 * \ingroup std
44 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
45 */
46
47namespace std
48{
49
50/*!\brief Minimum offset between two objects to avoid false sharing.
51 * \ingroup std_new
52 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
53 */
54inline constexpr std::size_t hardware_destructive_interference_size = 64;
55
56/*!\brief Maximum size of contiguous memory to promote true sharing.
57 * \ingroup std_new
58 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
59 */
60inline constexpr std::size_t hardware_constructive_interference_size = 64;
61
62} // namespace std
63
64#endif // __cpp_lib_hardware_interference_size
65
66#endif // SEQAN_STD_NEW_SHIM
Hide me