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