Skip to content

Data Elements

Adrian edited this page Sep 13, 2021 · 1 revision

Data Elements

Data elements define data, which can be accessed. The data element is a data flow oriented abstraction of a variable. The parameters for abstract data elements are defined as follows:

  • identifier: an identifier for the data element, it is necessary to retrieve the data element from the variable table.
  • typeName: defines what type of primitive values the data element can hold, e.g., Integer or Double etc.
  • isInitialized: true iff, the data element is implicitly defined, e.g., as a function parameter.
  • isReturnData: true iff, the data element is used as the result of a parallel pattern.
  • trace: defines the data trace of a data element. The trace stores where and how a data element is accessed in the order of the computation.
  • copyIndices: stores, after which access a new copy should be used for further calculations. This can be used to resolve read write conflicts.
  • Additionally, each data element can provide its size in bytes. Although, this is not stored as a parameter.

The definition of the data trace can be found here. All following instantiations of data extend the base data element.

Primitive Data

Primitive data elements define data elements that only contain a single element of a predefined type. There are no additional parameters defined for primitive data elements.

Literal Data

Literal data elements define literals that are fixed in their value and data type. Additional, to the parameters of the data element literal data elements also store their fixed value.

  • value: the value of the literal.

Array Data

Array data elements define data elements containing a fixed number of elements of a single type. The elements can be structured as a vector, matrix or higher dimensional data structures. To account for the shape of the array data element the following parameter is added:

  • shape: defines how many elements of the previous dimension are contained in the current dimension, e.g., a shape of (k,i,j) means we have a 3 dimensional data structure which contains k matricies with i rows and j columns each.

Function Return Data

Function return data elements define the occurrence of a function call within an expression. They are only needed for encoding expressions and do not introduce additional parameters.

Function Inline Data

Function inline data elements define the a function call within an expression. They are generated to enclose function calls with their parameters for inlining and simplification purposes. They introduce the following new parameters:

  • call: the expression defining the function call with the corresponding parameters.
  • dimension: the dimensionality of the result.

IO Data

IO data elements define the occurrence of an IO action within an expression. They define the following new parameter:

  • isOutput: true, iff the IO data element defines an output operation.
  • hasFileAccess: true, iff the IO data element accesses a file for the IO operation.

Temp Data

Temp data defines temporary data currently used to store partial results for optimized reduction. It does not have any additional parameters.