Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ConcurrencyBase.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ConcurrencyBase.cc (C) 2000-2025 */
9/* */
10/* Base classes for multi-threading management. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/base/ConcurrencyBase.h"
15
16/*---------------------------------------------------------------------------*/
17/*---------------------------------------------------------------------------*/
18
19namespace Arcane
20{
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25Int32 ConcurrencyBase::m_max_allowed_thread = 1;
26ParallelLoopOptions ConcurrencyBase::m_default_loop_options;
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
39{
40 if (v < 0)
41 v = 1;
42 m_max_allowed_thread = v;
43}
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
48} // End namespace Arcane
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
static void _setMaxAllowedThread(Int32 v)
Sets the maximum number of threads to use.
Execution options for a parallel loop in multi-threading.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.