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. |
| 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. But first, a brief introduction to the annotation language syntax is presented next. |
| 85 | |
| 86 | === Annotation Syntax === |
| 87 | |
| 88 | Orio 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 | |
| 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 has a fixed form to close the annotation region. |