Module: Bones

Defined in:
lib/bones.rb,
lib/bones/copy.rb,
lib/bones/engine.rb,
lib/bones/species.rb,
lib/bones/variable.rb,
lib/bones/algorithm.rb,
lib/bones/structure.rb,
lib/bones/preprocessor.rb,
lib/bones/variablelist.rb

Overview

The Bones module keeps all the Bones classes and constants together. It contains the classes:

  • Engine The main component of the Bones tool, providing the high-level tool flow.

  • Preprocessor A C-preprocessor, extracting class information from source code.

  • Algorithm An individual algorithm, containing an algorithm classification, code and more.

  • Species A class representing an algorithm class (or: species).

  • Variable A class for individual variables (not related to CAST).

  • Structure A class inheriting from the String class, representing parts of the algorithm classification.

The module also contains a list of inter-class constants.

Defined Under Namespace

Classes: Algorithm, Common, Copy, Engine, Preprocessor, Species, Structure, Variable, Variablelist

Constant Summary collapse

NL =

Set the newline character

"\n"
INDENT =

Set the tab size (currently: 2 spaces)

'  '
MESSAGE =

A string given as a start of an informative message. See also ERROR and WARNING.

'[Bones] ### Info   : '
WARNING =

A string given as a start of an warning message. See also ERROR and MESSAGE.

'[Bones] ### Warning: '
ERROR =

A string given as a start of an error message. See also MESSAGE and WARNING.

'[Bones] ### Error  : '
INPUT =

Gives a string representing an read-only variable. See also OUTPUT, INOUT and DIRECTIONS.

'in'
OUTPUT =

Gives a string representing an write-only variable. See also INPUT, INOUT and DIRECTIONS.

'out'
INOUT =

Gives a string representing an read/write variable. See also INPUT, OUTPUT and DIRECTIONS.

'inout'
DIRECTIONS =

Gives a list of all directions considered. Makes use of the INPUT and OUTPUT constants.

[INPUT,OUTPUT]
WEDGE =

A string representing the combination character (‘^’) of a species. See also ARROW and PIPE.

'^'
ARROW =

A string representing the production character (‘->’) of a species. See also WEDGE and PIPE.

'->'
PIPE =

A string representing the pipe character (‘|’) of a species. See also WEDGE and ARROW.

'|'
RANGE_SEP =

A string representing the colon character (‘:’) to separate ranges in dimensions.

':'
DIM_SEP =

A string representing the comma character (‘,’) to separate different ranges.

','
VARIABLE_PREFIX =

Sets the prefix used by variables in the skeleton library. This is used in LOCAL_MEMORY, GLOBAL_ID, LOCAL_ID, GLOBAL_SIZE and LOCAL_SIZE.

'bones_'
LOCAL_MEMORY =

Sets the variable name for the local memory variable in the skeleton library.

VARIABLE_PREFIX+'local_memory'
PRIVATE_MEMORY =

Sets the variable name for the thread private (i.e. register) memory variable in the skeleton library.

VARIABLE_PREFIX+'private_memory'
GLOBAL_ID =

Sets the variable name for the global memory thread index in the skeleton library.

VARIABLE_PREFIX+'global_id'
LOCAL_ID =

Sets the variable name for the local memory thread index in the skeleton library.

VARIABLE_PREFIX+'local_id'
GLOBAL_SIZE =

Sets the variable name for the global memory size as used in the skeleton library.

VARIABLE_PREFIX+'global_size'
LOCAL_SIZE =

Sets the variable name for the local memory size as used in the skeleton library.

VARIABLE_PREFIX+'local_size'
INITIALIZATION_DEFINITION =

Provide a function definition for the initialization C-code (if present). See als INITIALIZATION_CODE.

'void '+VARIABLE_PREFIX+'initialize_target(void);'
INITIALIZATION_CODE =

Provide a function call to the initialization C-code (if present). See als INITIALIZATION_DEFINITION.

VARIABLE_PREFIX+'initialize_target();'
GOLDEN =

Sets the name for the ‘golden’ output, required for verification purposes.

VARIABLE_PREFIX+'golden'
LOOP =

Sets the loop variable name for the ‘golden’ output, required for verification purposes.

VARIABLE_PREFIX+'loop'
DEVICE =

Constant to set the device variable name

'device_'
SAR_MARKER1 =

Provides the starting marker for a search-and-replace variable. See also SAR_MARKER2.

'<'
SAR_MARKER2 =

Provides the ending marker for a search-and-replace variable. See also SAR_MARKER1.

'>'
START_DEFINITION =

Set the start of a function definition, used in the skeleton library files. See also END_DEFINITION.

'\/\* STARTDEF'
END_DEFINITION =

Set the end of a function definition, used in the skeleton library files. See also START_DEFINITION.

'ENDDEF \*\/'