282 | | In the earlier AXPY-4 case, we can view the annotation body block as redundant, since the module body already contains the same or similar program. The motivation behind requiring Orio users to include the computation itself as part of the annotation is to avoid making use of a full-fledged C compiler infrastructure that potentially will compromise the simplicity, reliability, and portability of Orio. Furthermore, another reason is to allow the computation to be expressed by using domain-specific high-level languages, thus capturing the semantics without imposing tuning constraints resulting from the use of a general-purpose language. |
283 | | |
284 | | ??? simple example of construction of a new module |
| 281 | In the earlier AXPY-4 case, one could view the module body block as redundant, since the annotation body already contains the same program. The motivation behind requiring Orio users to include the computation itself as part of the annotation is to avoid making use of a full-fledged C compiler infrastructure that potentially will compromise the simplicity, reliability, and portability of Orio. Furthermore, another reason is to allow the computation to be expressed by using domain-specific high-level languages, thus capturing the semantics without imposing tuning constraints resulting from the use of a general-purpose language. |
| 282 | |
| 283 | Below, we present a very simple example, which extends Orio with a new module that simply rewrites the annotated code without applying any code transformations at all. The new module has no parser component since there is no necessity to extract information from the annotated code, significantly simplifying the module implementation. First, we need to create a new subdirectory (with a name `simplyrewrite`, for instance) inside `src/module`. And then, we create an ''empty'' special file `__init__.py` inside directory `src/module/simplyrewrite`, so that Python will know that this folder is a package (i.e. a Python module). |
| 284 | |