//===--- OpenMPKinds.def - OpenMP directives and clauses list ---*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
/// \file
/// \brief This file defines the list of supported OpenMP directives and
/// clauses.
///
//===----------------------------------------------------------------------===//

#ifndef OPENMP_DIRECTIVE
#  define OPENMP_DIRECTIVE(Name)
#endif
#ifndef OPENMP_DIRECTIVE_EXT
#define OPENMP_DIRECTIVE_EXT(Name, Str)
#endif
#ifndef OPENMP_CLAUSE
#  define OPENMP_CLAUSE(Name, Class)
#endif
#ifndef OPENMP_PARALLEL_CLAUSE
#  define OPENMP_PARALLEL_CLAUSE(Name)
#endif
#ifndef OPENMP_SIMD_CLAUSE
#  define OPENMP_SIMD_CLAUSE(Name)
#endif
#ifndef OPENMP_FOR_CLAUSE
#  define OPENMP_FOR_CLAUSE(Name)
#endif
#ifndef OPENMP_SECTIONS_CLAUSE
#  define OPENMP_SECTIONS_CLAUSE(Name)
#endif
#ifndef OPENMP_SINGLE_CLAUSE
#  define OPENMP_SINGLE_CLAUSE(Name)
#endif
#ifndef OPENMP_PARALLEL_FOR_CLAUSE
#  define OPENMP_PARALLEL_FOR_CLAUSE(Name)
#endif
#ifndef OPENMP_PARALLEL_SECTIONS_CLAUSE
#  define OPENMP_PARALLEL_SECTIONS_CLAUSE(Name)
#endif
#ifndef OPENMP_TASK_CLAUSE
#  define OPENMP_TASK_CLAUSE(Name)
#endif
#ifndef OPENMP_ATOMIC_CLAUSE
#  define OPENMP_ATOMIC_CLAUSE(Name)
#endif
#ifndef OPENMP_DEFAULT_KIND
#  define OPENMP_DEFAULT_KIND(Name)
#endif
#ifndef OPENMP_PROC_BIND_KIND
#  define OPENMP_PROC_BIND_KIND(Name)
#endif
#ifndef OPENMP_SCHEDULE_KIND
#define OPENMP_SCHEDULE_KIND(Name)
#endif

// OpenMP directives.
OPENMP_DIRECTIVE(threadprivate)
OPENMP_DIRECTIVE(parallel)
OPENMP_DIRECTIVE(task)
OPENMP_DIRECTIVE(simd)
OPENMP_DIRECTIVE(for)
OPENMP_DIRECTIVE(sections)
OPENMP_DIRECTIVE(section)
OPENMP_DIRECTIVE(single)
OPENMP_DIRECTIVE(master)
OPENMP_DIRECTIVE(critical)
OPENMP_DIRECTIVE(taskyield)
OPENMP_DIRECTIVE(barrier)
OPENMP_DIRECTIVE(taskwait)
OPENMP_DIRECTIVE(flush)
OPENMP_DIRECTIVE(ordered)
OPENMP_DIRECTIVE(atomic)
OPENMP_DIRECTIVE_EXT(parallel_for, "parallel for")
OPENMP_DIRECTIVE_EXT(parallel_sections, "parallel sections")

// OpenMP clauses.
OPENMP_CLAUSE(if, OMPIfClause)
OPENMP_CLAUSE(final, OMPFinalClause)
OPENMP_CLAUSE(num_threads, OMPNumThreadsClause)
OPENMP_CLAUSE(safelen, OMPSafelenClause)
OPENMP_CLAUSE(collapse, OMPCollapseClause)
OPENMP_CLAUSE(default, OMPDefaultClause)
OPENMP_CLAUSE(private, OMPPrivateClause)
OPENMP_CLAUSE(firstprivate, OMPFirstprivateClause)
OPENMP_CLAUSE(lastprivate, OMPLastprivateClause)
OPENMP_CLAUSE(shared,  OMPSharedClause)
OPENMP_CLAUSE(reduction,  OMPReductionClause)
OPENMP_CLAUSE(linear,  OMPLinearClause)
OPENMP_CLAUSE(aligned, OMPAlignedClause)
OPENMP_CLAUSE(copyin,  OMPCopyinClause)
OPENMP_CLAUSE(copyprivate,  OMPCopyprivateClause)
OPENMP_CLAUSE(proc_bind, OMPProcBindClause)
OPENMP_CLAUSE(schedule, OMPScheduleClause)
OPENMP_CLAUSE(ordered, OMPOrderedClause)
OPENMP_CLAUSE(nowait, OMPNowaitClause)
OPENMP_CLAUSE(untied, OMPUntiedClause)
OPENMP_CLAUSE(mergeable, OMPMergeableClause)
OPENMP_CLAUSE(flush, OMPFlushClause)
OPENMP_CLAUSE(read, OMPReadClause)
OPENMP_CLAUSE(write, OMPWriteClause)
OPENMP_CLAUSE(update, OMPUpdateClause)
OPENMP_CLAUSE(capture, OMPCaptureClause)
OPENMP_CLAUSE(seq_cst, OMPSeqCstClause)

// Clauses allowed for OpenMP directive 'parallel'.
OPENMP_PARALLEL_CLAUSE(if)
OPENMP_PARALLEL_CLAUSE(num_threads)
OPENMP_PARALLEL_CLAUSE(default)
OPENMP_PARALLEL_CLAUSE(proc_bind)
OPENMP_PARALLEL_CLAUSE(private)
OPENMP_PARALLEL_CLAUSE(firstprivate)
OPENMP_PARALLEL_CLAUSE(shared)
OPENMP_PARALLEL_CLAUSE(reduction)
OPENMP_PARALLEL_CLAUSE(copyin)

// Clauses allowed for directive 'omp simd'.
OPENMP_SIMD_CLAUSE(private)
OPENMP_SIMD_CLAUSE(lastprivate)
OPENMP_SIMD_CLAUSE(linear)
OPENMP_SIMD_CLAUSE(aligned)
OPENMP_SIMD_CLAUSE(safelen)
OPENMP_SIMD_CLAUSE(collapse)
OPENMP_SIMD_CLAUSE(reduction)

// Clauses allowed for directive 'omp for'.
OPENMP_FOR_CLAUSE(private)
OPENMP_FOR_CLAUSE(lastprivate)
OPENMP_FOR_CLAUSE(firstprivate)
OPENMP_FOR_CLAUSE(reduction)
OPENMP_FOR_CLAUSE(collapse)
OPENMP_FOR_CLAUSE(schedule)
OPENMP_FOR_CLAUSE(ordered)
OPENMP_FOR_CLAUSE(nowait)

// Clauses allowed for OpenMP directive 'omp sections'.
OPENMP_SECTIONS_CLAUSE(private)
OPENMP_SECTIONS_CLAUSE(lastprivate)
OPENMP_SECTIONS_CLAUSE(firstprivate)
OPENMP_SECTIONS_CLAUSE(reduction)
OPENMP_SECTIONS_CLAUSE(nowait)

// Clauses allowed for directive 'omp single'.
OPENMP_SINGLE_CLAUSE(private)
OPENMP_SINGLE_CLAUSE(firstprivate)
OPENMP_SINGLE_CLAUSE(copyprivate)
OPENMP_SINGLE_CLAUSE(nowait)

// Static attributes for 'default' clause.
OPENMP_DEFAULT_KIND(none)
OPENMP_DEFAULT_KIND(shared)

// Static attributes for 'proc_bind' clause.
OPENMP_PROC_BIND_KIND(master)
OPENMP_PROC_BIND_KIND(close)
OPENMP_PROC_BIND_KIND(spread)

// Static attributes for 'schedule' clause.
OPENMP_SCHEDULE_KIND(static)
OPENMP_SCHEDULE_KIND(dynamic)
OPENMP_SCHEDULE_KIND(guided)
OPENMP_SCHEDULE_KIND(auto)
OPENMP_SCHEDULE_KIND(runtime)

// Clauses allowed for OpenMP directive 'parallel for'.
OPENMP_PARALLEL_FOR_CLAUSE(if)
OPENMP_PARALLEL_FOR_CLAUSE(num_threads)
OPENMP_PARALLEL_FOR_CLAUSE(default)
OPENMP_PARALLEL_FOR_CLAUSE(proc_bind)
OPENMP_PARALLEL_FOR_CLAUSE(private)
OPENMP_PARALLEL_FOR_CLAUSE(firstprivate)
OPENMP_PARALLEL_FOR_CLAUSE(shared)
OPENMP_PARALLEL_FOR_CLAUSE(reduction)
OPENMP_PARALLEL_FOR_CLAUSE(copyin)
OPENMP_PARALLEL_FOR_CLAUSE(lastprivate)
OPENMP_PARALLEL_FOR_CLAUSE(collapse)
OPENMP_PARALLEL_FOR_CLAUSE(schedule)
OPENMP_PARALLEL_FOR_CLAUSE(ordered)

// Clauses allowed for OpenMP directive 'parallel sections'.
OPENMP_PARALLEL_SECTIONS_CLAUSE(if)
OPENMP_PARALLEL_SECTIONS_CLAUSE(num_threads)
OPENMP_PARALLEL_SECTIONS_CLAUSE(default)
OPENMP_PARALLEL_SECTIONS_CLAUSE(proc_bind)
OPENMP_PARALLEL_SECTIONS_CLAUSE(private)
OPENMP_PARALLEL_SECTIONS_CLAUSE(firstprivate)
OPENMP_PARALLEL_SECTIONS_CLAUSE(shared)
OPENMP_PARALLEL_SECTIONS_CLAUSE(reduction)
OPENMP_PARALLEL_SECTIONS_CLAUSE(copyin)
OPENMP_PARALLEL_SECTIONS_CLAUSE(lastprivate)

// Clauses allowed for OpenMP directive 'task'.
OPENMP_TASK_CLAUSE(if)
OPENMP_TASK_CLAUSE(final)
OPENMP_TASK_CLAUSE(default)
OPENMP_TASK_CLAUSE(private)
OPENMP_TASK_CLAUSE(firstprivate)
OPENMP_TASK_CLAUSE(shared)
OPENMP_TASK_CLAUSE(untied)
OPENMP_TASK_CLAUSE(mergeable)

// Clauses allowed for OpenMP directive 'atomic'.
OPENMP_ATOMIC_CLAUSE(read)
OPENMP_ATOMIC_CLAUSE(write)
OPENMP_ATOMIC_CLAUSE(update)
OPENMP_ATOMIC_CLAUSE(capture)
OPENMP_ATOMIC_CLAUSE(seq_cst)

#undef OPENMP_SCHEDULE_KIND
#undef OPENMP_PROC_BIND_KIND
#undef OPENMP_DEFAULT_KIND
#undef OPENMP_DIRECTIVE
#undef OPENMP_DIRECTIVE_EXT
#undef OPENMP_CLAUSE
#undef OPENMP_SINGLE_CLAUSE
#undef OPENMP_SECTIONS_CLAUSE
#undef OPENMP_PARALLEL_CLAUSE
#undef OPENMP_PARALLEL_FOR_CLAUSE
#undef OPENMP_PARALLEL_SECTIONS_CLAUSE
#undef OPENMP_TASK_CLAUSE
#undef OPENMP_ATOMIC_CLAUSE
#undef OPENMP_SIMD_CLAUSE
#undef OPENMP_FOR_CLAUSE

