slatec-sys 0.1.0

Unsafe, provider-neutral Rust declarations for the reviewed SLATEC raw API
Documentation
//! Hand-reviewed raw declarations for selected real FFTPACK routines.
//!
//! These are the single-precision routines present in the selected SLATEC
//! `fishfft` snapshot.  The `N` argument is passed by mutable Fortran
//! reference for ABI compatibility but is an input in the reviewed routines.
//! Mutability of array arguments is declared per routine below; safe plan
//! wrappers own the workspace and validate all slice lengths before calling
//! them.

use crate::FortranInteger;

unsafe extern "C" {
    /// Initializes a periodic real FFT workspace of at least `2*N + 15` words.
    #[link_name = "rffti_"]
    pub fn rffti(n: *mut FortranInteger, wsave: *mut f32);
    /// Computes an in-place packed periodic real forward transform.
    #[link_name = "rfftf_"]
    pub fn rfftf(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);
    /// Computes an in-place packed periodic real backward transform.
    #[link_name = "rfftb_"]
    pub fn rfftb(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);

    /// Initializes an easy real Fourier transform workspace of at least `3*N + 15` words.
    #[link_name = "ezffti_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/ezffti.md"))]
    pub fn ezffti(n: *mut FortranInteger, wsave: *mut f32);
    /// Computes separate easy real Fourier coefficients.
    #[link_name = "ezfftf_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/ezfftf.md"))]
    pub fn ezfftf(
        n: *mut FortranInteger,
        values: *const f32,
        azero: *mut f32,
        cosine: *mut f32,
        sine: *mut f32,
        wsave: *mut f32,
    );
    /// Synthesizes a real periodic sequence from easy Fourier coefficients.
    #[link_name = "ezfftb_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/ezfftb.md"))]
    pub fn ezfftb(
        n: *mut FortranInteger,
        values: *mut f32,
        azero: *const f32,
        cosine: *const f32,
        sine: *const f32,
        wsave: *mut f32,
    );

    /// Initializes a full sine-transform workspace.
    #[link_name = "sinti_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/sinti.md"))]
    pub fn sinti(n: *mut FortranInteger, wsave: *mut f32);
    /// Computes the in-place full sine transform.
    #[link_name = "sint_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/sint.md"))]
    pub fn sint(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);

    /// Initializes a full cosine-transform workspace.
    #[link_name = "costi_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/costi.md"))]
    pub fn costi(n: *mut FortranInteger, wsave: *mut f32);
    /// Computes the in-place full cosine transform.
    #[link_name = "cost_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/cost.md"))]
    pub fn cost(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);

    /// Initializes a quarter-wave sine-transform workspace.
    #[link_name = "sinqi_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/sinqi.md"))]
    pub fn sinqi(n: *mut FortranInteger, wsave: *mut f32);
    /// Computes the in-place quarter-wave sine forward transform.
    #[link_name = "sinqf_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/sinqf.md"))]
    pub fn sinqf(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);
    /// Computes the in-place quarter-wave sine backward transform.
    #[link_name = "sinqb_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/sinqb.md"))]
    pub fn sinqb(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);

    /// Initializes a quarter-wave cosine-transform workspace.
    #[link_name = "cosqi_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/cosqi.md"))]
    pub fn cosqi(n: *mut FortranInteger, wsave: *mut f32);
    /// Computes the in-place quarter-wave cosine forward transform.
    #[link_name = "cosqf_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/cosqf.md"))]
    pub fn cosqf(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);
    /// Computes the in-place quarter-wave cosine backward transform.
    #[link_name = "cosqb_"]
#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated_docs/cosqb.md"))]
    pub fn cosqb(n: *mut FortranInteger, values: *mut f32, wsave: *mut f32);
}

/// Canonical complex FFTPACK kernel declarations.
///
/// The reviewed complex plan facade uses these `*1` routines directly. They
/// remain declaration-only and retain the documented interleaved-real ABI.
#[cfg(all(
    feature = "raw-family-fftpack-complex",
    not(feature = "raw-family-fftpack-extended-real")
))]
pub use crate::fftpack_complex::{cfftb1, cfftf1, cffti1};

#[cfg(feature = "raw-family-fftpack-extended-real")]
#[path = "batch_a/fftpack.rs"]
mod canonical_bindings;

/// Canonical source-verified FFTPACK declarations.
#[cfg(feature = "raw-family-fftpack-extended-real")]
pub use canonical_bindings::*;