Skip to content
Snippets Groups Projects

WIP: Use auto keyword for lazy evaluation in EigenStepper

Closed Andreas Salzburger requested to merge ACTS-483_Global_Error_Propagation into master

Closes ACTS-483

This is a first step towards fully global error propagation, as a first step the auto keyword is used for lazy evaluation where possible.

Edited by Andreas Salzburger

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Can you test somehow where it actually does the evaluation? That would be interesting to see.

  • Robert Johannes Langenberg resolved all discussions

    resolved all discussions

  • added 1 commit

    Compare with previous version

  • Andreas Salzburger resolved all discussions

    resolved all discussions

  • added 20 commits

    Compare with previous version

  • added 16 commits

    Compare with previous version

  • For job clang_tidy on commit: a53beed8

    Static analysis results: Accepted

    ok pattern count limit
    :white_check_mark: readability-inconsistent-declaration-parameter-name 0 0
    :white_check_mark: readability-named-parameter 0 0
    :white_check_mark: readability-container-size-empty 0 0
    :white_check_mark: modernize-use-using 0 0
    :white_check_mark: readability-braces-around-statements 0 0
    :white_check_mark: modernize-use-override 0 0
    :white_check_mark: readability-implicit-bool-cast 0 0
    :white_check_mark: modernize-use-default-member-init 0 0
    :white_check_mark: performance-unnecessary-value-param 0 0
    :white_check_mark: modernize-use-equals-default 0 0
    :white_check_mark: modernize-use-nullptr 0 0

    Analysis results at: https://acts.web.cern.ch/ACTS/static_analysis/acts-core/mr/457/clang_tidy

  • This one is also rebased now and ready to go in. @fklimpel @hgraslan @pagessin

  • Andreas Salzburger resolved all discussions

    resolved all discussions

  • added 1 commit

    Compare with previous version

  • For job clang_tidy on commit: 9fae2a6f

    Static analysis results: Accepted

    ok pattern count limit
    :white_check_mark: readability-inconsistent-declaration-parameter-name 0 0
    :white_check_mark: readability-named-parameter 0 0
    :white_check_mark: readability-container-size-empty 0 0
    :white_check_mark: modernize-use-using 0 0
    :white_check_mark: readability-braces-around-statements 0 0
    :white_check_mark: modernize-use-override 0 0
    :white_check_mark: readability-implicit-bool-cast 0 0
    :white_check_mark: modernize-use-default-member-init 0 0
    :white_check_mark: performance-unnecessary-value-param 0 0
    :white_check_mark: modernize-use-equals-default 0 0
    :white_check_mark: modernize-use-nullptr 0 0

    Analysis results at: https://acts.web.cern.ch/ACTS/static_analysis/acts-core/mr/457/clang_tidy

  • @fklimpel @pagessin what do you think?

  • Fabian Klimpel approved this merge request

    approved this merge request

  • 256 256 auto rframeT = surface.initJacobianToLocal(jacToLocal, pos, dir);
    257 257 // Update the jacobian with the transport from the steps
    258 258 jacToGlobal = jacTransport * jacToGlobal;
    259 // calculate the form factors for the derivatives
    260 const ActsRowVectorD<5> sVec
    259 // Calculate the form factors for the derivatives
    260 const ActsRowVectorD<5> sfactors
    261 261 = surface.derivativeFactors(pos, dir, rframeT, jacToGlobal);
    262 // the full jacobian is ([to local] jacobian) * ([transport] jacobian)
    263 const ActsMatrixD<5, 5> jacFull
    264 = jacToLocal * (jacToGlobal - derivative * sVec);
    262 // The full jacobian is ([to local] jacobian) * ([transport] jacobian)
    263 // use auto keyword to profit from lazy evaluation
    264 auto jacFull = jacToLocal * (jacToGlobal - derivative * sfactors);
    • This is actually counterproductive I think. jacFull will be evaluated once (maybe even twice) in line 266 and then again in line 283. Eigen has no way to cache the result, and if the result is used in more than one expression, that might be the right thing.

      Edited by Paul Gessinger
    • Please register or sign in to reply
  • So the more I think about this, the more I tend to not introduce these changes without measuring thoroughly. The Eigen docs mention

    In short: do not use the auto keywords with Eigen's expressions, unless you are 100% sure about what you are doing.

    in order not to shoot oneself in the foot.

    Sorry to be that guy here, but can we see some numbers?

  • Ok, you have a point - I put it aside then for the moment and call it WIP.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading