RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
include
RAJA
policy
openmp
region.hpp
Go to the documentation of this file.
1
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
2
// Copyright (c) Lawrence Livermore National Security, LLC and other
3
// RAJA Project Developers. See top-level LICENSE and COPYRIGHT
4
// files for dates and other details. No copyright assignment is required
5
// to contribute to RAJA.
6
//
7
// SPDX-License-Identifier: (BSD-3-Clause)
8
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
9
10
#ifndef RAJA_region_openmp_HPP
11
#define RAJA_region_openmp_HPP
12
13
namespace
RAJA
14
{
15
namespace
policy
16
{
17
namespace
omp
18
{
19
39
template
<
typename
Func>
40
RAJA_INLINE
void
region_impl
(
const
omp_parallel_region
&, Func&&
body
)
41
{
42
43
#pragma omp parallel
44
{
// curly brackets to ensure body() is encapsulated in omp parallel region
45
// thread private copy of body
46
auto
loopbody =
body
;
47
loopbody();
48
}
49
}
50
51
}
// namespace omp
52
53
}
// namespace policy
54
55
}
// namespace RAJA
56
57
#endif
// closing endif for header file include guard
RAJA::policy::omp::region_impl
RAJA_INLINE void region_impl(const omp_parallel_region &, Func &&body)
RAJA::region implementation for OpenMP.
Definition:
region.hpp:40
RAJA
Definition:
AlignedRangeIndexSetBuilders.cpp:35
RAJA::body
auto & body
Definition:
launch.hpp:177
RAJA::policy::omp::omp_parallel_region
Definition:
policy.hpp:137
Generated by
1.9.1