SeqAn3 3.3.0
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_new new
23 * \ingroup std
24 * \brief The [<new> header](https://en.cppreference.com/w/cpp/header/new) from C++17's standard library.
25 */
26
27namespace std
28{
29
30/*!\brief Minimum offset between two objects to avoid false sharing.
31 * \ingroup std_new
32 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
33 */
34inline constexpr std::size_t hardware_destructive_interference_size = 64;
35
36/*!\brief Maximum size of contiguous memory to promote true sharing.
37 * \ingroup std_new
38 * \sa https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size
39 */
40inline constexpr std::size_t hardware_constructive_interference_size = 64;
41
42} // namespace std
43
44#endif // __cpp_lib_hardware_interference_size
45
46#endif // SEQAN_STD_NEW_SHIM