Arcane  4.2.1.0
Developer documentation
Loading...
Searching...
No Matches
DirectExecutionFunctor.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/* DirectExecutionFunctor.cc (C) 2000-2026 */
9/* */
10/* Functor for direct execution. */
11/*---------------------------------------------------------------------------*/
12
13#include "arcane/launcher/internal/DirectExecutionFunctor.h"
14
15#include "arcane/launcher/ArcaneLauncher.h"
16
17#include <iostream>
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28int DirectExecutionWrapper::
29run()
30{
31 return ArcaneLauncher::run();
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37int DirectExecutionWrapper::
39{
40 std::cout << "DIRECT CALL (DirectExecutionContext)\n";
41 if (!f)
42 return (-1);
43 auto f2 = [=](DirectExecutionContext& ctx2) -> int {
44 return f->execute(&ctx2);
45 };
46 return ArcaneLauncher::run(f2);
47}
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52int DirectExecutionWrapper::
54{
55 std::cout << "DIRECT CALL (DirectSubDomainExecutionContext)\n";
56 if (!f)
57 return (-1);
58 auto f2 = [=](DirectSubDomainExecutionContext& ctx2) -> int {
59 return f->execute(&ctx2);
60 };
61 return ArcaneLauncher::run(f2);
62}
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67} // End namespace Arcane
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
static int run()
Entry point of the executable in Arcane.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --