Changes between Version 32 and Version 33 of Orio


Ignore:
Timestamp:
06/11/08 20:27:48 (15 years ago)
Author:
hartono
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Orio

    v32 v33  
    8282== User Guide == 
    8383 
    84 As previously discussed , Orio has two main functions: a ''source-to-source transformation tool'' and an ''automatic performance tuning tool''. In the following subsections, simple examples are provided to offer users the quickest way to begin using Orio. 
     84As previously discussed , Orio has two main functions: a ''source-to-source transformation tool'' and an ''automatic performance tuning tool''. In the following subsections, simple examples are provided to offer users the quickest way to begin using Orio. But first, a brief introduction to the annotation language syntax is presented next. 
     85 
     86=== Annotation Syntax === 
     87 
     88Orio annotation is denoted as a stylized C/C++ comment that starts with `/*@` and ends with `@*/`. For instance, the annotation `/*@ end @*/`, called ''trailer annotation'', is used to indicate the end of an annotated code region. The following simple grammar illustrates the fundamental structure of Orio annotations. 
     89 
     90  <annotation-region> ::= <leader-annotation> <annotation-body> <trailer-annotation> [[BR]] 
     91  <leader-annotation> ::= `/*@ begin` <module-name> `(` <module-body> `) @*/` [[BR]] 
     92  <trailer-annotation> ::= `/*@ end @*/` [[BR]] 
     93 
     94An ''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 has a fixed form to close the annotation region. 
    8595 
    8696=== Using Orio as a Source-to-Source Code Transformation Tool === 
     
    99109}}} 
    100110 
    101 In order to apply loop unrolling to the above code, run the following Orio command (assuming that the code is stored in the file `axpy4.c`). 
     111In order to apply loop unrolling to the above code, run the following Orio command (assuming that the annotated code is stored in the file `axpy4.c`). 
    102112 
    103113{{{ 
     
    105115}}} 
    106116 
    107 By default, the transformed output code is written to the file `_axpy4.c`. Users can specify the name of the output file using the command option '`-o <file>`'. Below is how the output code looks like. 
     117By default, the transformed output code is written to the file `_axpy4.c`. Optionally, users can specify the name of the output file using the command option '`-o <file>`'. Below is how the output code looks like. 
    108118 
    109119{{{ 
     
    129139}}} 
    130140 
     141How to correctly annotate the source code depends on how the pertinent transformation modules are written. 
     142 
    131143=== Using Orio as an Automatic Performance Tool === 
    132144