Changes between Version 34 and Version 35 of Orio
- Timestamp:
- 06/11/08 21:08:31 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Orio
v34 v35 94 94 An ''annotation region'' consists of three main parts: ''leader annotation'', ''annotation body'', and ''trailer annotation''. The annotation body can either be empty or contain C/C++ code that may include other nested annotation regions. A leader annotation contains the ''module name'' of the code transformation component that is loaded dynamically by Orio. A high level abstraction of the computation and the performance hints are coded in the ''module body'' inside the leader annotation and are used as input by the transformation module during the transformation and code generation phases. A trailer annotation, which has a fixed form (i.e. `/*@ end @*/`), closes an annotation region. 95 95 96 A concrete example of an annotated application code can be seen in the next subsection. 97 96 98 === Using Orio as a Source-to-Source Code Transformation Tool === 97 99 … … 139 141 }}} 140 142 141 How to correctly annotate the source code depends on how the pertinent transformation modules are written.143 In this AXPY-4 example, the name of the code transformation module used to perform loop unrolling is `Loop`. The AXPY-4 computation is rewritten in the module body along with the loop unrolling performance hints (i.e. an unroll factor of four). The resulting unrolled code comprises two loops: one loop with the fully unrolled body, and another loop for any remaining iterations that are not executed in the unrolled loop. Additionally, the generated code include the original code (initially written in the annotation body area) that can be executed through setting the ORIGCODE preprocessor variable accordingly. 142 144 143 145 === Using Orio as an Automatic Performance Tool ===