slatec-sys 0.1.0

Unsafe, provider-neutral Rust declarations for the reviewed SLATEC raw API
Documentation
//! Hand-reviewed raw declarations for the selected SLATEC PCHIP package.
//!
//! Every array is contiguous in the safe facade, so it passes `INCFD = 1`.
//! `SKIP` is a GNU Fortran `LOGICAL`, represented by [`FortranLogical`], not
//! a Rust `bool`.  The native routines do not take callbacks.

use crate::{FortranInteger, FortranLogical};

unsafe extern "C" {
    /// Constructs monotonicity-preserving single-precision Hermite derivatives.
    #[link_name = "pchim_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/pchim.md"))]
    pub fn pchim(
        n: *mut FortranInteger,
        x: *const f32,
        f: *const f32,
        d: *mut f32,
        incfd: *mut FortranInteger,
        ierr: *mut FortranInteger,
    );
    /// Constructs monotonicity-preserving double-precision Hermite derivatives.
    #[link_name = "dpchim_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/dpchim.md"))]
    pub fn dpchim(
        n: *mut FortranInteger,
        x: *const f64,
        f: *const f64,
        d: *mut f64,
        incfd: *mut FortranInteger,
        ierr: *mut FortranInteger,
    );
    /// Constructs controlled monotone single-precision Hermite derivatives.
    #[link_name = "pchic_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/pchic.md"))]
    pub fn pchic(
        ic: *const FortranInteger,
        vc: *const f32,
        switch: *const f32,
        n: *mut FortranInteger,
        x: *const f32,
        f: *const f32,
        d: *mut f32,
        incfd: *mut FortranInteger,
        workspace: *mut f32,
        workspace_len: *mut FortranInteger,
        ierr: *mut FortranInteger,
    );
    /// Constructs controlled monotone double-precision Hermite derivatives.
    #[link_name = "dpchic_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/dpchic.md"))]
    pub fn dpchic(
        ic: *const FortranInteger,
        vc: *const f64,
        switch: *const f64,
        n: *mut FortranInteger,
        x: *const f64,
        f: *const f64,
        d: *mut f64,
        incfd: *mut FortranInteger,
        workspace: *mut f64,
        workspace_len: *mut FortranInteger,
        ierr: *mut FortranInteger,
    );
    /// Constructs single-precision cubic-spline Hermite derivatives.
    #[link_name = "pchsp_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/pchsp.md"))]
    pub fn pchsp(
        ic: *const FortranInteger,
        vc: *const f32,
        n: *mut FortranInteger,
        x: *const f32,
        f: *const f32,
        d: *mut f32,
        incfd: *mut FortranInteger,
        workspace: *mut f32,
        workspace_len: *mut FortranInteger,
        ierr: *mut FortranInteger,
    );
    /// Constructs double-precision cubic-spline Hermite derivatives.
    #[link_name = "dpchsp_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/dpchsp.md"))]
    pub fn dpchsp(
        ic: *const FortranInteger,
        vc: *const f64,
        n: *mut FortranInteger,
        x: *const f64,
        f: *const f64,
        d: *mut f64,
        incfd: *mut FortranInteger,
        workspace: *mut f64,
        workspace_len: *mut FortranInteger,
        ierr: *mut FortranInteger,
    );
    /// Evaluates a single-precision Hermite function.
    #[link_name = "pchfe_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/pchfe.md"))]
    pub fn pchfe(
        n: *mut FortranInteger,
        x: *const f32,
        f: *const f32,
        d: *const f32,
        incfd: *mut FortranInteger,
        skip: *mut FortranLogical,
        evaluation_count: *mut FortranInteger,
        evaluation_points: *const f32,
        values: *mut f32,
        ierr: *mut FortranInteger,
    );
    /// Evaluates a double-precision Hermite function.
    #[link_name = "dpchfe_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/dpchfe.md"))]
    pub fn dpchfe(
        n: *mut FortranInteger,
        x: *const f64,
        f: *const f64,
        d: *const f64,
        incfd: *mut FortranInteger,
        skip: *mut FortranLogical,
        evaluation_count: *mut FortranInteger,
        evaluation_points: *const f64,
        values: *mut f64,
        ierr: *mut FortranInteger,
    );
    /// Evaluates a single-precision Hermite function and first derivative.
    #[link_name = "pchfd_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/pchfd.md"))]
    pub fn pchfd(
        n: *mut FortranInteger,
        x: *const f32,
        f: *const f32,
        d: *const f32,
        incfd: *mut FortranInteger,
        skip: *mut FortranLogical,
        evaluation_count: *mut FortranInteger,
        evaluation_points: *const f32,
        values: *mut f32,
        derivatives: *mut f32,
        ierr: *mut FortranInteger,
    );
    /// Evaluates a double-precision Hermite function and first derivative.
    #[link_name = "dpchfd_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/dpchfd.md"))]
    pub fn dpchfd(
        n: *mut FortranInteger,
        x: *const f64,
        f: *const f64,
        d: *const f64,
        incfd: *mut FortranInteger,
        skip: *mut FortranLogical,
        evaluation_count: *mut FortranInteger,
        evaluation_points: *const f64,
        values: *mut f64,
        derivatives: *mut f64,
        ierr: *mut FortranInteger,
    );
    /// Integrates a single-precision Hermite curve over arbitrary limits.
    #[link_name = "pchia_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/pchia.md"))]
    pub fn pchia(
        n: *mut FortranInteger,
        x: *const f32,
        f: *const f32,
        d: *const f32,
        incfd: *mut FortranInteger,
        skip: *mut FortranLogical,
        lower: *const f32,
        upper: *const f32,
        ierr: *mut FortranInteger,
    ) -> f32;
    /// Integrates a double-precision Hermite curve over arbitrary limits.
    #[link_name = "dpchia_"]
    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/dpchia.md"))]
    pub fn dpchia(
        n: *mut FortranInteger,
        x: *const f64,
        f: *const f64,
        d: *const f64,
        incfd: *mut FortranInteger,
        skip: *mut FortranLogical,
        lower: *const f64,
        upper: *const f64,
        ierr: *mut FortranInteger,
    ) -> f64;
}