Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-15836

Add helper code for invoking C++ templates from Python dtype arguments

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: utils
    • Labels:
    • Story Points:
      1
    • Sprint:
      BG3_F18_09
    • Team:
      Data Release Production

      Description

      In C++, it's natural to require an explicit template argument for templated functions whose template parameters only affect their return type. That doesn't work when wrapping normally with pybind11, which just sees a set of equivalent overloaded functions and blithely selects the first one defined.

      The [Num-]Pythonic interface for functions like this would take a dtype argument to select the type returned, and this ticket will provide a helper class that makes that easy to implement.

      This is a spin-off from DM-15500, where this helper code is now almost complete.

      I'm calling this gen3-middleware because that's why I'm doing DM-15500, even though this ticket is a few steps removed from the core gen3 work. TCAMs are welcome to reclassify.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment - - edited

            Fritz Mueller, I know you probably don't work in this corner of the codebase much, but I'm trying to branch out a bit in my C++-heavy review requests, and I think this is pretty digestible on its own. If you don't have time, I'd love to get a recommendation from you on other C++ devs on the DAX team who might be good for reviews like this.

            All changes are in the utils package.

            Show
            jbosch Jim Bosch added a comment - - edited Fritz Mueller , I know you probably don't work in this corner of the codebase much, but I'm trying to branch out a bit in my C++-heavy review requests, and I think this is pretty digestible on its own. If you don't have time, I'd love to get a recommendation from you on other C++ devs on the DAX team who might be good for reviews like this. All changes are in the utils package.
            Hide
            jbosch Jim Bosch added a comment -

            Nate Lust, here's that review I asked you about earlier today.  No rush, and hopefully it'll be moderately familiar after seeing the usage of this stuff in afw on DM-15500.

            Show
            jbosch Jim Bosch added a comment - Nate Lust , here's that review I asked you about earlier today.  No rush, and hopefully it'll be moderately familiar after seeing the usage of this stuff in afw on DM-15500 .
            Hide
            jbosch Jim Bosch added a comment -

            Nate Lust, requested changes made.  Please take a look if you're curious.

            Show
            jbosch Jim Bosch added a comment - Nate Lust , requested changes made.  Please take a look if you're curious.

              People

              Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Reviewers:
              Nate Lust
              Watchers:
              Jim Bosch, Nate Lust
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.