pyccel.ast.omp module#
OpenMP has several constructs and directives, and this file contains the OpenMP types that are supported. We represent some types with the OmpAnnotatedComment type. These types are detailed on our documentation: pyccel/pyccel
- class pyccel.ast.omp.OMP_Cancel_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents OpenMP Cancel construct.
- class pyccel.ast.omp.OMP_Critical_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Critical construct.
- class pyccel.ast.omp.OMP_Distribute_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Distribute construct
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_For_Loop(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Loop construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Masked_Construct(txt, has_nowait=False, combined=None)[source]#
Bases:
OmpAnnotatedCommentRepresents OpenMP Masked construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Master_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents OpenMP Master construct.
- class pyccel.ast.omp.OMP_Parallel_Construct(txt, has_nowait=False, combined=None)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Parallel construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Section_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresent OpenMP Section construct.
- class pyccel.ast.omp.OMP_Sections_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents OpenMP Sections construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Simd_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Simd construct
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Single_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Single construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Target_Construct(txt, has_nowait=False, combined=None)[source]#
Bases:
OmpAnnotatedCommentRepresents OpenMP Target construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_TaskLoop_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Taskloop construct
- property name#
Name of the construct.
- class pyccel.ast.omp.OMP_Task_Construct(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents an OpenMP Task construct.
- class pyccel.ast.omp.OMP_Teams_Construct(txt, has_nowait=False, combined=None)[source]#
Bases:
OmpAnnotatedCommentRepresents OpenMP Teams construct.
- property name#
Name of the construct.
- class pyccel.ast.omp.OmpAnnotatedComment(txt, has_nowait=False, combined=None)[source]#
Bases:
PyccelAstNodeRepresents an OpenMP Annotated Comment in the code.
- Parameters:
txt (str) – statement to print
combined (List (Optional)) – constructs to be combined with the current construct
Examples
>>> from pyccel.ast.omp import OmpAnnotatedComment >>> OmpAnnotatedComment('parallel') OmpAnnotatedComment(parallel)
- property combined#
Used to store the combined construct of a directive.
- property has_nowait#
Used to check if the construct has a nowait clause.
- property is_multiline#
Used to check if the construct needs brackets.
- property name#
Name of the construct.
- property txt#
Used to store clauses.
- class pyccel.ast.omp.Omp_End_Clause(txt, has_nowait)[source]#
Bases:
OmpAnnotatedCommentRepresents the End of an OpenMP block.