PDL#

📦 stdpdl

use PDL boots Core, Ops, Ufunc, Math, Primitive, Slices, Basic and exports the standard PDL functions into the caller’s namespace.

Option B Architecture#

Every PDL object in Perl stores a *mut c_pdl (the C-repr struct from core_vtable) directly in PERL_MAGIC_ext on the blessed SV. This mirrors how upstream PDL does it (pdl_SetSV_PDL / pdl_SvPDLV from pdlcore.c).

No rust_pdl::Pdl intermediary. No copy bridge. The same pointer that lives in the SV is passed directly to pdl_run_* functions.

Child submodules declared here (leaf-with-children pattern, same as crate::native::p5::Peta::FFI) because PDL has both its own P5_ENTRY and 14 sub-namespace modules. Rust does not allow #[path] combined with an inline block.

Modules#

  • PDL::Bad — bad value (missing data) support

  • PDL::Basic — basic constructors and utility functions

  • PDL::Constants — mathematical and physical constants

  • PDL::Core — constructors, accessors, type system, DESTROY

  • PDL::FFT — Fast Fourier Transform operations

  • PDL::Lite — minimum PDL module OO loader

  • PDL::LiteF — PDL::Lite + Basic + Primitive

  • PDL::Math — mathematical functions (sin, cos, exp, log, etc.)

  • PDL::MatrixOps — matrix operations (det, inv, eigens, etc.)

  • PDL::Ops — element-wise arithmetic, comparison, and logic operations

  • PDL::Primitive — fundamental operations (inner, outer, matmult, etc.)

  • PDL::Slices — indexing, slicing, and data rearrangement

  • PDL::Types — PDL type system (byte, short, long, float, double, etc.)

  • PDL::Ufunc — Unary reductions and aggregations over PDL arrays.

Functions#

Other Functions#

type_convert_func#

Shared XS function for all type constructors (byte, short, float, etc.)