Skip to content
Baptiste Wicht edited this page Jul 12, 2015 · 1 revision

ETL has several types of expressions:

  1. unary_expr: Represents an unary expression. This expressions stores a left-hand-side (lhs) and a right-hand-side (rhs). In its template is an operator type. For an access to i, lhs(i) is passed to operator and the results is returned. There are two special operators:
  1. identity_op: This is used for operations that returns a view of a container making it modifiable. This is the only kind of expression that is assignable. The lhs is not a real expression but a view operation that itself stores the real lhs.
  2. stateful_op: This is used for operations that modifies the order (and or the values) of the sequence and is not binary in nature (transpose for instance). Again, the lhs is not a real expression but a placeholder operator that itself stores the real lhs.
  1. binary_expr: Represents a binary expression. This expression stores a left-hand-side (lhs) expression and a right-hand-side (rhs) expression. In its template type is an operator type. For an access to i, lhs(i) and rhs(i) are passed to the operator and the result is returned.
  2. generator_expr: Represents a generator expression. This expression stores a generator expression. For an access to i, generator(i) is returned.
  3. temporary_expr: Special types of expression for complex operations (matrix multiplication, convolution, ...). This type of expression is precomputed. Once it is assigned, it is directly completely computed using an operator (template parameter) prior to the assignment itself. For an access to i, result(i) is directly returned. There is an unary (FFT) version and a binary version (mmul).