RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
Namespaces | Classes | Typedefs | Functions
RAJA::policy::omp Namespace Reference

Namespaces

 expt
 
 internal
 

Classes

struct  Parallel
 
struct  For
 
struct  NoWait
 
struct  Auto
 
struct  Static
 
struct  Runtime
 
struct  omp_parallel_region
 
struct  omp_launch_t
 
struct  omp_for_nowait_schedule_exec
 
struct  omp_for_schedule_exec
 
struct  omp_taskgraph_segit
 
struct  omp_taskgraph_interval_segit
 
struct  omp_work
 
struct  omp_reduce
 
struct  omp_reduce_ordered
 
struct  omp_multi_reduce_policy
 
struct  omp_synchronize
 
struct  omp_atomic
 
struct  omp_thread
 
struct  Teams
 
struct  Target
 
struct  Distribute
 
struct  Collapse
 
struct  omp_target_parallel_for_exec
 
struct  omp_target_parallel_for_exec_nt
 
struct  omp_target_parallel_collapse_exec
 
struct  omp_target_reduce
 
struct  omp_target_work
 

Typedefs

template<int ChunkSize = default_chunk_size>
using Dynamic = internal::Schedule< omp_sched_dynamic, ChunkSize >
 
template<int ChunkSize = default_chunk_size>
using Guided = internal::Schedule< omp_sched_guided, ChunkSize >
 
using omp_for_exec = omp_for_schedule_exec< Auto >
 
template<int ChunkSize = default_chunk_size>
using omp_for_static_exec = omp_for_schedule_exec< omp::Static< ChunkSize > >
 
template<int ChunkSize = default_chunk_size>
using omp_for_dynamic_exec = omp_for_schedule_exec< omp::Dynamic< ChunkSize > >
 
template<int ChunkSize = default_chunk_size>
using omp_for_guided_exec = omp_for_schedule_exec< omp::Guided< ChunkSize > >
 
using omp_for_runtime_exec = omp_for_schedule_exec< omp::Runtime >
 
template<int ChunkSize = default_chunk_size>
using omp_for_nowait_static_exec = omp_for_nowait_schedule_exec< omp::Static< ChunkSize > >
 
template<typename InnerPolicy >
using omp_parallel_exec = make_policy_pattern_launch_platform_t< Policy::openmp, Pattern::forall, Launch::undefined, Platform::host, omp::Parallel, wrapper< InnerPolicy > >
 
using omp_parallel_for_exec = omp_parallel_exec< omp_for_exec >
 
template<int ChunkSize = default_chunk_size>
using omp_parallel_for_static_exec = omp_parallel_exec< omp_for_schedule_exec< omp::Static< ChunkSize > >>
 
template<int ChunkSize = default_chunk_size>
using omp_parallel_for_dynamic_exec = omp_parallel_exec< omp_for_schedule_exec< omp::Dynamic< ChunkSize > >>
 
template<int ChunkSize = default_chunk_size>
using omp_parallel_for_guided_exec = omp_parallel_exec< omp_for_schedule_exec< omp::Guided< ChunkSize > >>
 
using omp_parallel_for_runtime_exec = omp_parallel_exec< omp_for_schedule_exec< omp::Runtime > >
 
using omp_parallel_for_segit = omp_parallel_for_exec
 
using omp_parallel_segit = omp_parallel_for_segit
 
template<RAJA::omp::multi_reduce_algorithm algorithm>
using omp_multi_reduce_tuning = omp_multi_reduce_policy< RAJA::omp::MultiReduceTuning< algorithm > >
 
using omp_multi_reduce_combine_on_destruction = omp_multi_reduce_tuning< RAJA::omp::multi_reduce_algorithm::combine_on_destruction >
 
using omp_multi_reduce_combine_on_get = omp_multi_reduce_tuning< RAJA::omp::multi_reduce_algorithm::combine_on_get >
 
using omp_multi_reduce_ordered = omp_multi_reduce_combine_on_get
 
using omp_multi_reduce_unordered = omp_multi_reduce_combine_on_destruction
 
using omp_multi_reduce = omp_multi_reduce_unordered
 

Functions

template<typename Iterable , typename Func , typename InnerPolicy , typename ForallParam >
RAJA_INLINE concepts::enable_if_t< resources::EventProxy< resources::Host >, RAJA::expt::type_traits::is_ForallParamPack< ForallParam >, concepts::negate< RAJA::expt::type_traits::is_ForallParamPack_empty< ForallParam > > > forall_impl (resources::Host host_res, const omp_parallel_exec< InnerPolicy > &, Iterable &&iter, Func &&loop_body, ForallParam f_params)
 
template<typename Func >
RAJA_INLINE void region_impl (const omp_parallel_region &, Func &&body)
 RAJA::region implementation for OpenMP. More...
 
RAJA_INLINE void synchronize_impl (const omp_synchronize &)
 Synchronize all OpenMP threads and tasks. More...
 

Typedef Documentation

◆ Dynamic

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::Dynamic = typedef internal::Schedule<omp_sched_dynamic, ChunkSize>

◆ Guided

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::Guided = typedef internal::Schedule<omp_sched_guided, ChunkSize>

◆ omp_for_exec

Internal type aliases supporting 'omp for schedule( )' for specific schedule types.

◆ omp_for_static_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_for_static_exec = typedef omp_for_schedule_exec<omp::Static<ChunkSize> >

◆ omp_for_dynamic_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_for_dynamic_exec = typedef omp_for_schedule_exec<omp::Dynamic<ChunkSize> >

◆ omp_for_guided_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_for_guided_exec = typedef omp_for_schedule_exec<omp::Guided<ChunkSize> >

◆ omp_for_runtime_exec

◆ omp_for_nowait_static_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_for_nowait_static_exec = typedef omp_for_nowait_schedule_exec<omp::Static<ChunkSize> >

Internal type aliases supporting 'omp for schedule( ) nowait' for specific schedule types.

IMPORTANT: We only provide a nowait policy option for static scheduling since that is the only scheduling case that can be used with nowait and be correct in general. Paraphrasing the OpenMP standard:

Programs that depend on which thread executes a particular iteration under any circumstance other than static schedule are non-conforming.

◆ omp_parallel_exec

Struct supporting OpenMP 'parallel' region containing an inner loop execution construct.

◆ omp_parallel_for_exec

Internal type aliases supporting 'omp parallel for schedule( )' for specific schedule types.

◆ omp_parallel_for_static_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_parallel_for_static_exec = typedef omp_parallel_exec<omp_for_schedule_exec<omp::Static<ChunkSize> >>

◆ omp_parallel_for_dynamic_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_parallel_for_dynamic_exec = typedef omp_parallel_exec<omp_for_schedule_exec<omp::Dynamic<ChunkSize> >>

◆ omp_parallel_for_guided_exec

template<int ChunkSize = default_chunk_size>
using RAJA::policy::omp::omp_parallel_for_guided_exec = typedef omp_parallel_exec<omp_for_schedule_exec<omp::Guided<ChunkSize> >>

◆ omp_parallel_for_runtime_exec

◆ omp_parallel_for_segit

Basic Indexset segment iteration policies

◆ omp_parallel_segit

◆ omp_multi_reduce_tuning

template<RAJA::omp::multi_reduce_algorithm algorithm>
using RAJA::policy::omp::omp_multi_reduce_tuning = typedef omp_multi_reduce_policy<RAJA::omp::MultiReduceTuning<algorithm> >

◆ omp_multi_reduce_combine_on_destruction

◆ omp_multi_reduce_combine_on_get

◆ omp_multi_reduce_ordered

◆ omp_multi_reduce_unordered

◆ omp_multi_reduce

Function Documentation

◆ forall_impl()

template<typename Iterable , typename Func , typename InnerPolicy , typename ForallParam >
RAJA_INLINE concepts::enable_if_t< resources::EventProxy<resources::Host>, RAJA::expt::type_traits::is_ForallParamPack<ForallParam>, concepts::negate< RAJA::expt::type_traits::is_ForallParamPack_empty<ForallParam> > > RAJA::policy::omp::forall_impl ( resources::Host  host_res,
const omp_parallel_exec< InnerPolicy > &  ,
Iterable &&  iter,
Func &&  loop_body,
ForallParam  f_params 
)

OpenMP parallel policy implementation

◆ region_impl()

template<typename Func >
RAJA_INLINE void RAJA::policy::omp::region_impl ( const omp_parallel_region ,
Func &&  body 
)

RAJA::region implementation for OpenMP.

Generates an OpenMP parallel region

RAJA::region<omp_parallel_region>([=](){
// region body - may contain multiple loops
});
Template Parameters
Policyregion policy

◆ synchronize_impl()

RAJA_INLINE void RAJA::policy::omp::synchronize_impl ( const omp_synchronize )

Synchronize all OpenMP threads and tasks.