14#include "arccore/common/ArccoreApplicationBuildInfo.h"
15#include "arccore/common/CommandLineArguments.h"
16#include "arccore/common/internal/FieldProperty.h"
17#include "arccore/common/internal/ArccoreApplicationBuildInfoImpl.h"
32 x = std::min(std::max(x, min_value), max_value);
39ArccoreApplicationBuildInfoImpl::ArccoreApplicationBuildInfoImpl()
43 m_nb_task_thread.setValidator([](Int32& x) { _clamp(x, -1, 512); });
46String ArccoreApplicationBuildInfoImpl::
47getValue(
const UniqueArray<String>& env_values,
const String& param_name,
48 const String& default_value)
50 return m_property_key_values.getValue(env_values, param_name, default_value);
53void ArccoreApplicationBuildInfoImpl::
54addKeyValue(
const String& name,
const String& value)
56 m_property_key_values.add(name, value);
62ArccoreApplicationBuildInfo::
63ArccoreApplicationBuildInfo()
64: m_core(new ArccoreApplicationBuildInfoImpl())
68ArccoreApplicationBuildInfo::
69ArccoreApplicationBuildInfo(
const ArccoreApplicationBuildInfo& rhs)
70: m_core(new ArccoreApplicationBuildInfoImpl(*rhs.m_core))
74ArccoreApplicationBuildInfo& ArccoreApplicationBuildInfo::
75operator=(
const ArccoreApplicationBuildInfo& rhs)
79 m_core =
new ArccoreApplicationBuildInfoImpl(*(rhs.m_core));
84ArccoreApplicationBuildInfo::
85~ArccoreApplicationBuildInfo()
96void ArccoreApplicationBuildInfo::
100 String str = m_core->getValue({
"ARCANE_NB_TASK" },
"T", String());
101 PropertyImpl::checkSet(m_core->m_nb_task_thread, str);
108void ArccoreApplicationBuildInfo::
112 String str = m_core->getValue({
"ARCANE_TASK_IMPLEMENTATION" },
"TaskService",
"TBB");
113 String service_name = str +
"TaskImplementation";
114 PropertyImpl::checkSet(m_core->m_task_implementation_services, service_name);
118 String thread_str = m_core->getValue({
"ARCANE_THREAD_IMPLEMENTATION" },
"ThreadService",
"Std");
119 list1.add(thread_str +
"ThreadImplementationService");
120 list1.add(
"TBBThreadImplementationService");
121 PropertyImpl::checkSet(m_core->m_thread_implementation_services, list1);
128void ArccoreApplicationBuildInfo::
129setTaskImplementationService(
const String& name)
133 m_core->m_task_implementation_services = s;
135void ArccoreApplicationBuildInfo::
136setTaskImplementationServices(
const StringList& names)
138 m_core->m_task_implementation_services = names;
141taskImplementationServices()
const
143 return m_core->m_task_implementation_services;
149void ArccoreApplicationBuildInfo::
150setThreadImplementationService(
const String& name)
154 m_core->m_thread_implementation_services = s;
156void ArccoreApplicationBuildInfo::
157setThreadImplementationServices(
const StringList& names)
159 m_core->m_thread_implementation_services = names;
162threadImplementationServices()
const
164 return m_core->m_thread_implementation_services;
170Int32 ArccoreApplicationBuildInfo::
173 return m_core->m_nb_task_thread;
179void ArccoreApplicationBuildInfo::
180setNbTaskThread(Int32 v)
182 m_core->m_nb_task_thread = v;
188void ArccoreApplicationBuildInfo::
189addParameter(
const String& name,
const String& value)
191 m_core->addKeyValue(name, value);
197void ArccoreApplicationBuildInfo::
198parseArgumentsAndSetDefaultsValues(
const CommandLineArguments& command_line_args)
204 command_line_args.fillParameters(names, values);
205 for (Integer i = 0, n = names.count(); i < n; ++i) {
206 addParameter(names[i], values[i]);
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
List< String > StringList
Tableau de chaînes de caractères unicode.
std::int32_t Int32
Type entier signé sur 32 bits.