Arcane  4.1.15.0
Developer documentation
Loading...
Searching...
No Matches
TestLambda.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#include <gtest/gtest.h>
9
10#include "arccore/common/accelerator/Runner.h"
11
12#include "arccore/accelerator/internal/Initializer.h"
13
14#include "./TestCommon.h"
15
16/*---------------------------------------------------------------------------*/
17/*---------------------------------------------------------------------------*/
18
19using namespace Arcane;
20using namespace Arcane::Accelerator;
21
22extern "C++" void
23_doTestLambda(RunQueue queue);
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28void _doLambda(bool use_accelerator, Int32 max_allowed_thread)
29{
30 Accelerator::Initializer x(use_accelerator, max_allowed_thread);
31 Runner runner(x.executionPolicy());
32 RunQueue queue(makeQueue(runner));
33 _doTestLambda(queue);
34}
35
36ARCCORE_TEST_DO_TEST_ACCELERATOR(ArccoreAccelerator, TestLambda, _doLambda);
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
Internal class to initialize the accelerator runtime.
Definition Initializer.h:38
RunQueue makeQueue(const Runner &runner)
Creates a queue associated with runner.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --