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