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]View on GitHub#

Bases: OmpAnnotatedComment

Represents OpenMP Cancel construct.

class pyccel.ast.omp.OMP_Critical_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Critical construct.

class pyccel.ast.omp.OMP_Distribute_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Distribute construct

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_For_Loop(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Loop construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Masked_Construct(txt, has_nowait=False, combined=None)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents OpenMP Masked construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Master_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents OpenMP Master construct.

class pyccel.ast.omp.OMP_Parallel_Construct(txt, has_nowait=False, combined=None)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Parallel construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Section_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represent OpenMP Section construct.

class pyccel.ast.omp.OMP_Sections_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents OpenMP Sections construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Simd_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Simd construct

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Single_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Single construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Target_Construct(txt, has_nowait=False, combined=None)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents OpenMP Target construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_TaskLoop_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Taskloop construct

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OMP_Task_Construct(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents an OpenMP Task construct.

class pyccel.ast.omp.OMP_Teams_Construct(txt, has_nowait=False, combined=None)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents OpenMP Teams construct.

property nameView on GitHub#

Name of the construct.

class pyccel.ast.omp.OmpAnnotatedComment(txt, has_nowait=False, combined=None)[source]View on GitHub#

Bases: PyccelAstNode

Represents 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 combinedView on GitHub#

Used to store the combined construct of a directive.

property has_nowaitView on GitHub#

Used to check if the construct has a nowait clause.

property is_multilineView on GitHub#

Used to check if the construct needs brackets.

property nameView on GitHub#

Name of the construct.

property txtView on GitHub#

Used to store clauses.

class pyccel.ast.omp.Omp_End_Clause(txt, has_nowait)[source]View on GitHub#

Bases: OmpAnnotatedComment

Represents the End of an OpenMP block.