Skip to content

Make trans vtables more visible to Perl, enable kernels to be passed as callbacks #506

@mohawk2

Description

@mohawk2

In order to better support both #349 and PDL libraries that want to pass callbacks (PDL::LinearAlgebra, PDL::GSL::MROOT, among others), it would be good to make transformations' vtables more of a first-class entity. Things I can think of needed:

  • have a package array variable listing all the xforms
  • have a Perl class method that can instantiate a vtable
  • store the various types of Code in the vtable
  • make those available as Perl methods, maybe including an as_hashref method
  • break out the per-gentype code snippets into separate kernel functions, put them in a vtable array entry
  • allow a vtable object to be passed as a callback for e.g. PDL::GSL::MROOT - this would mean not needing to enter Perl space for each callback-call

This also links to #505.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions