Skip to content
Snippets Groups Projects

An enumeration dictionary for ECbmModuleId

Merged Sergei Zharko requested to merge s.zharko/cbmroot:ECbmModuleID-dictionary into master

The merge request adds an enumeration dictionary for ECbmModuleId. The purpose of this is to simplify the usage of the enumeration in yaml configs.

NOTE: The merge request depends on !2086 (merged), which in turn depends on !2085 (merged)

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
  • Dirk Hutter added 1 commit

    added 1 commit

    • d7217cef - Bump online container version

    Compare with previous version

  • I pushed what I think needs to be changed. Unfortunately the CI does not run now for other reasons.

  • Volker Friese added 5 commits

    added 5 commits

    • d7217cef...21ab95f6 - 3 commits from branch computing:master
    • 5e71b017 - Moving cbm::algo::EnumDict to CbmUtility library as cbm::util::EnumDict;...
    • 2282ef2f - Bump online container version

    Compare with previous version

  • Now it fails with an error related caused by the templated function not existing

    In file included from /opt/cbm/src/core/data/sts/CbmStsDigi.h:16:
    /opt/cbm/src/core/data/CbmDefs.h:120:70: error: no matching function for call to 'ToString'
    inline std::string ToString(ECbmModuleId modId) { return std::string(cbm::util::ToString(modId)); }
                                                                         ^~~~~~~~~~~~~~~~~~~
    /opt/cbm/src/core/utility/CbmEnumDict.h:64:20: note: candidate template ignored: requirement 'detail::EnumHasDict_v<ECbmModuleId>' was not satisfied [with T = ECbmModuleId]
      std::string_view ToString(T t)
                       ^

    I think this is not related to the container environment but more likely to the different build flow of the online binary. One should be able to run the online binary build flow by running the commands in https://git.cbm.gsi.de/computing/cbmroot/-/blob/master/.ci/online/scripts/install.sh.

  • Sergei Zharko mentioned in merge request !2094

    mentioned in merge request !2094

  • Ok, after the discussions we had, we can summarise: In your methods ToString, ToCbmModuleId and ToCbmModuleIdCaseInsensitive, you make use of cbm::util::FromString and cbm::util::ToString. These, however, are not present in the GPU case, which is why the compilation fails.

    You would have to protect your methods like those in cbm::util by #if XPU_IS_CPU.

    However, your methods are just wrappers of cbm::util::ToString and cbm::util::FromString; honestly, I do not see any added value here.

  • @s.zharko Since we now understand why this does not compile, and since this MR is in my understanding not longer needed, could you please close it or take other actions?

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