Skip to content

Unify spline eval via many-point kernel and keep legacy APIs as harness #202

@krystophny

Description

@krystophny

Goal

Make the new GPU-ready many-point batch spline evaluation the single source of truth, and route existing scalar + batch entry points through it without changing behavior.

Motivation

  • Reduce duplication across scalar and batch spline evaluation code paths.
  • Ensure OpenACC acceleration can be used by downstream codes through a consistent interface.
  • Keep the old routines as a behavioral harness (tests) to guarantee no regressions.

Prerequisite

Proposed work

  1. Introduce an internal evaluation kernel (per dimension) that supports:
    • single point (npts=1) and many points
    • output layout y(nq, npts)
  2. Implement facades:
    • existing scalar APIs call the kernel with nq=1/appropriate layout
    • existing batch single-point APIs call the kernel with npts=1
    • existing many-point APIs already use the kernel
  3. Keep the old public routines as thin wrappers initially, but add tests that cross-check:
    • old scalar vs new facade
    • old batch single-point vs new facade
    • old many-point vs reference
  4. Ensure OpenACC pass-through:
    • keep resident variants that rely on present(...)
    • document the downstream-managed data lifetime requirements

Acceptance

  • No numerical behavior change (existing tests remain unchanged; new cross-check tests added).
  • Downstream can compile+link with OpenACC and keep data resident across algorithms.

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