Region Class Reference
[PEARL.base]

Stores information related to a source-code region. More...

#include <Region.h>

Inheritance diagram for Region:

NamedObject IdObject

List of all members.

Public Types

enum  {
  CLASS_INTERNAL = ( 0 << 24), CLASS_USER = ( 1 << 24), CLASS_MPI = ( 2 << 24), CLASS_OMP = ( 4 << 24),
  CAT_MPI_SETUP = ( 1 << 16), CAT_MPI_COLLECTIVE = ( 2 << 16), CAT_MPI_P2P = ( 4 << 16), CAT_MPI_RMA = ( 8 << 16),
  CAT_MPI_IO = ( 16 << 16), CAT_OMP_PARALLEL = ( 1 << 16), TYPE_MPI_INIT = ( 1 << 8), TYPE_MPI_FINALIZE = ( 2 << 8),
  TYPE_MPI_BARRIER = ( 1 << 8), TYPE_MPI_ONE_TO_N = ( 2 << 8), TYPE_MPI_N_TO_ONE = ( 4 << 8), TYPE_MPI_N_TO_N = ( 8 << 8),
  TYPE_MPI_PARTIAL = ( 16 << 8), TYPE_MPI_SEND = ( 1 << 8), TYPE_MPI_RECV = ( 2 << 8), TYPE_MPI_SENDRECV = ( 3 << 8),
  TYPE_MPI_TEST = ( 4 << 8), TYPE_MPI_WAIT = ( 8 << 8), MODE_MPI_STANDARD = ( 1 << 0), MODE_MPI_SYNCHRONOUS = ( 2 << 0),
  MODE_MPI_BUFFERED = ( 4 << 0), MODE_MPI_READY = ( 8 << 0), MODE_MPI_NONBLOCKING = ( 16 << 0), MODE_MPI_PERSISTENT = ( 32 << 0),
  MODE_MPI_SINGLE = ( 1 << 0), MODE_MPI_MANY = ( 2 << 0)
}
 Symbolic names for region classification.

Public Member Functions

Constructors & destructor
 Region (ident_t id, const std::string &name, const std::string &file, line_t begin, line_t end, const std::string &description, uint8_t type)
Get region information
std::string get_file () const
line_t get_begin () const
line_t get_end () const
std::string get_description () const
std::string get_type () const
Get region classification
uint32_t get_class () const


Detailed Description

Instances of the Region class provide information about source-code regions of the target application. Such a region is characterized by a name, a file in which it is defined, begin and end line numbers, and a region type. In addition, a short textual description can be stored for each region.

The numerical identifiers of the individual regions are globally defined and continuously enumerated, i.e., the ID is element of [0,#regions-1].


Constructor & Destructor Documentation

Region ( ident_t  id,
const std::string &  name,
const std::string &  file,
line_t  begin,
line_t  end,
const std::string &  description,
uint8_t  type 
)

Creates a new instance and sets its data fields to the given values.

Parameters:
id Region identifier
name Region name
file Name of file in which the region is defined
begin Begin line number
end End line number
description Region description
type Region type


Member Function Documentation

line_t get_begin (  )  const

Returns the begin line number of the source-code region. If this information is not available, PEARL_NO_LINE is returned.

Returns:
Begin line number

uint32_t get_class (  )  const [inline]

Returns the region classification encoded in a bit string.

Returns:
Region classification

string get_description (  )  const

Returns the region description text associated with the source-code region. If this information is not available, an empty string is returned.

Returns:
Region description.

line_t get_end (  )  const

Returns the end line number of the source-code region. If this information is not available, PEARL_NO_LINE is returned.

Returns:
End line number

string get_file (  )  const

Returns the name of the file in which the region is defined. If this information is not available, an empty string is returned.

Returns:
File name

string get_type (  )  const

Returns the region type, which can be one of the following strings:

  • "FUNCTION"
  • "LOOP"
  • "USER_REGION" (user-defined region)
  • "OMP_PARALLEL"
  • "OMP_LOOP" (for/do construct)
  • "OMP_SECTIONS" (sections construct)
  • "OMP_SECTION" (individual section inside a sections construct)
  • "OMP_WORKSHARE"
  • "OMP_SINGLE"
  • "OMP_MASTER"
  • "OMP_CRITICAL"
  • "OMP_ATOMIC"
  • "OMP_BARRIER"
  • "OMP_IBARRIER" (implicit barrier)
  • "OMP_FLUSH"
  • "OMP_CRITICAL_SBLOCK" (body of critical construct)
  • "OMP_SINGLE_SBLOCK" (body of single construct)
  • "UNKNOWN"

Returns:
Region type


SCALASCA    Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre