Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
E
elsa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 9
    • Merge Requests 9
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • IP
  • elsa
  • Issues
  • #4

Closed
Open
Opened Oct 07, 2019 by Jens Petit@jens.petitContributor

Expression templates for evaluating algebraic terms

Currently within elsa, each operation, + for example, on DataContainers creates an intermediate result. Therefore, in algebraic terms like

DataContainer d = a + c * d

intermediate results for the individual terms like c*d will be calculated and stored in memory before the whole expression is evaluated. This can amount to multiple GBs of data for large DataContainers. Instead the element-wise result could be calculated directly for the whole term (here d[i] = a[i] + c[i] * d[i]).

Expression templates solve this problem by introducing delayed evaluation. Quoting wikipedia:

Expression templates implement delayed evaluation using expression trees that only exist at compile time. Each assignment to a Vec, such as Vec x = a + b + c, generates a new Vec constructor if needed by template instantiation. This constructor operates on three Vec; it allocates the necessary memory and then performs the computation. Thus only one memory allocation is performed.

For elsa context, replace Vec with DataContainer. The goal is to achieve a considerable reduction in memory usage as well as an increase in speed for longer algebraic terms.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: IP/elsa#4