Warning: Declaration of action_plugin_syntaxhighlighter3_action::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /s/chopin/e/proj/AlphaZ/public_html/wiki/lib/plugins/syntaxhighlighter3/action/action.php on line 112
code_gen_options [AlphaZ]

User Tools

Site Tools


code_gen_options

There are a number of options to the AlphaZ ScheduledC code generator, for example, we can choose to allocate a multi-dimensional array as a one dimensional array or not. To configure options to be used by the code generator, an instance of an CodeGenOptions object must be created first using the following commands.

options = createCGOptionForScheduledC();

Another command is used to set up the array flatten option

# Multi-dimensional arrays are allocated as a one-dimensional array when flatten option is not zero
setCGOptionFlattenArrays(CodeGenOptions option, int flatten)

There are options specific for tiled code, so if we want to generate tiled code using ScheduledC, we must create an instance of the TiledCodeGenOptions. TiledCodeGenOptions extends CodeGenOptions, and thus it can be used in place of CodeGenOptions as well. The command is the following

toptions = createTiledCGOptionForScheduledC();

The tiled code generator provides an optimization that it can select one group of statements and isolate it. The command used to set this optimization up is

# When optimize is not zero, the tiled code generator selects one group of statements to isolate.
setTiledCGOptionOptimize(TiledCodeGenOptions option, int optimize)
code_gen_options.txt · Last modified: 2014/05/30 11:49 (external edit)