CTC-String Decoding

Compile-Time-Context (CTC) strings are passed to the different API functions. These functions need to parse the string in order to process the encoded information. E.g., for OpenMP the OPARI2 package provides means of doing this, see POMP2_Region_info and ctcString2RegionInfo() in pomp2_region_info.h.

The CTC string is a string in the format "length*key=value*key=value*[key=value]**, for example:

*82*regionType=parallel*sscl=xmpl.c:61:61*escl=xmpl.c:66:66*hasIf=1**

Mandatory keys are:

- regionType Type of the region (here parallel)
- sscl First line of the region (usually with full path to file)
- escl Last line of the region

# OpenMP

Optional keys are

- hasNumThreads Set if a numThreads clause is used in the OpenMP directive
- hasIf Set if an if clause is used
- hasOrdered Set if an ordered clause is used
- hasReduction Set if a reduction clause is used
- hasSchedule Set if a schedule clause is used
- hasCollapse Set if a collapse clause is used

The optional values are set to 0 by default, i.e. the presence of the key denotes the presence of the respective clause.

You can use the function ctcString2RegionInfo() to decode CTC strings. It can be found in pomp2_region_info.c and pomp2_region_info.h, installed under <opari-prefix>/share/opari2/devel.