2.0.4 (revision 1809)
OpenMP Pragma And Region Instrumentor
Data Structures | Macros | Enumerations | Functions
pomp2_region_info.h File Reference

This file contains function declarations and structs which handle informations on OpenMP regions. POMP2_Region_info is used to store these informations. It can be filled with a ctcString by ctcString2RegionInfo(). More...

#include "opari2_region_info.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  POMP2_Region_info
 This struct stores all information on an OpenMP region, like the region type or corresponding source lines. The function ctcString2RegionInfo() can be used to fill this struct with data from a ctcString. More...
 

Macros

#define CTC_OMP_TOKENS
 

Enumerations

enum  POMP2_DefaultSharing_type
 
enum  POMP2_Region_type
 
enum  POMP2_Schedule_type
 

Functions

void ctcString2RegionInfo (const char ctcString[], POMP2_Region_info *regionInfo)
 
void freePOMP2RegionInfoMembers (POMP2_Region_info *regionInfo)
 
const char * pomp2defaultSharingType2String (POMP2_DefaultSharing_type defaultSharingType)
 
const char * pomp2RegionType2String (POMP2_Region_type regionType)
 
const char * pomp2ScheduleType2String (POMP2_Schedule_type scheduleType)
 

Detailed Description

This file contains function declarations and structs which handle informations on OpenMP regions. POMP2_Region_info is used to store these informations. It can be filled with a ctcString by ctcString2RegionInfo().

Date
Started Fri Mar 20 16:30:45 2009

Macro Definition Documentation

#define CTC_OMP_TOKENS
Value:
CTC_OMP_Has_copy_in, \
CTC_OMP_Has_copy_private, \
CTC_OMP_Has_defaultSharing, \
CTC_OMP_Has_first_private, \
CTC_OMP_Has_last_private, \
CTC_OMP_Has_no_wait, \
CTC_OMP_Has_ordered, \
CTC_OMP_Has_reduction, \
CTC_OMP_Has_schedule, \
CTC_OMP_Has_shared, \
CTC_OMP_Num_sections, \
CTC_OMP_Critical_name, \
CTC_OMP_User_group_name, \
CTC_OMP_Has_if, \
CTC_OMP_Has_collapse, \
CTC_OMP_Has_num_threads, \
CTC_OMP_Has_untied

CTC Tokens

Enumeration Type Documentation

type to store the default value data sharing

POMP2_Region_type

type to store the scheduling type of a for worksharing constuct

Function Documentation

void ctcString2RegionInfo ( const char  ctcString[],
POMP2_Region_info regionInfo 
)

ctcString2RegionInfo() fills the POMP2_Region_info object with data read from the ctcString. If the ctcString does not comply with the specification, the program aborts with exit code 1.


Rationale: ctcString2RegionInfo() is used during initialization of the measurement system. If an error occurs, it is better to abort than to struggle with undefined behaviour or guessing the meaning of the broken string.

Note
Can be called from multiple threads concurrently, assuming malloc is thread-safe.
ctcString2RegionInfo() will assign memory to the members of regionInfo. You are supposed to to release this memory by calling freePOMP2RegionInfoMembers().
Parameters
ctcStringA string in the format "length*key=value*[key=value]*". The length field is parsed but not used by this implementation. Possible values for key are listed in ctcTokenMap. The string must at least contain values for the keys regionType, sscl and escl. Possible values for the key regionType are listed in regionTypesMap. The format for sscl resp. escl values is "filename:lineNo1:lineNo2".
regionInfomust be a valid object
Postcondition
At least the required attributes (see POMP2_Region_info) are set.
All other members of regionInfo are set to 0 resp. false resp. POMP2_No_schedule.
If regionType=sections than POMP2_Region_info::mNumSections has a value > 0.
If regionType=critical than POMP2_Region_info::mCriticalName may have a value != 0.
void freePOMP2RegionInfoMembers ( POMP2_Region_info regionInfo)

Free the memory of the regionInfo members.

Parameters
regionInfoThe regioninfo to be freed.
const char* pomp2defaultSharingType2String ( POMP2_DefaultSharing_type  defaultSharingType)

converts defaultSharingType into a string

Parameters
defaultSharingTypeThe defaultSharingType to be converted.
Returns
string representation of the defaultSharingType
const char* pomp2RegionType2String ( POMP2_Region_type  regionType)

converts regionType into a string

Parameters
regionTypeThe regionType to be converted.
Returns
string representation of the region type
const char* pomp2ScheduleType2String ( POMP2_Schedule_type  scheduleType)

converts scheduleType into a string

Parameters
scheduleTypeThe scheduleType to be converted.
Returns
string representation of the scheduleType