FastHartleyTransform.jl
Fast real-to-real Hartley transforms for Julia, backed by FFTW on CPU, with optional CUDA and Reactant extensions.
Start here
- Getting started: installation, forward/inverse transforms, and spatial axes.
- Transform conventions: the kernel, normalization, and multidimensional behavior.
- Plans and buffers: reuse plans and control input mutation.
- Differentiation and compiled execution: Enzyme and Reactant usage.
- Backends and support: verified execution paths and device limitations.
- Performance: plan reuse, warmup, allocations, and timing.
- API reference: exported transform and planning functions.
A first transform
using FastHartleyTransform
x = [1.0, 2.0, 3.0, 4.0]
y = fht(x)
@assert ifht(y) ≈ x
y4-element Vector{Float64}:
10.0
-4.0
-2.0
0.0fht is unnormalized; ifht includes the inverse scale. The default multidimensional transform uses one cosine-plus-sine kernel, rather than a product of one-dimensional Hartley kernels. See Transform conventions before substituting another DHT implementation.
The common interface and optional CPU Enzyme rules are supplied by AbstractFastHartleyTransforms.jl. Install this package to obtain a concrete transform implementation.