Introduction
A Julia interface to Apple's Accelerate framework, providing high-performance BLAS/LAPACK, vectorized math operations, DSP/FFT, and sparse linear algebra on macOS.
Installation
Requires macOS 13.4+ and Julia 1.10+.
using Pkg
Pkg.add("AppleAccelerate")Feature Overview
| Feature | Backend | Details |
|---|---|---|
| Dense Linear Algebra | BLAS / LAPACK | Automatic forwarding via LBT — lu, qr, svd, mul!, etc. |
| Array Operations | vDSP / vecLib | Element-wise math (exp, sin, log), reductions, vector arithmetic |
| FFT & Transforms | vDSP FFT | Complex/real FFT (1D/2D), DFT, DCT with AbstractFFTs integration |
| Filtering & Spectral | vDSP | Convolution, biquad IIR, spectral analysis, window functions |
| Sparse Linear Algebra | Sparse Solvers | SpMV, direct solvers (QR, Cholesky, LDLT) |
Most functions are not exported to avoid conflicts with Base and LinearAlgebra. Access them via the AppleAccelerate. prefix (e.g., AppleAccelerate.exp(X)). The exception is dense linear algebra, which is activated automatically via LBT on package load.
- macOS only — this package uses Apple's Accelerate framework, which is not available on Linux or Windows.
- FFT requires power-of-2 sizes — use FFTW.jl for arbitrary sizes. DFT supports
f * 2^nwheref ∈ {1, 3, 5, 15}. - Float32/Float64 only — no support for integer or extended-precision types.
Quick Start
Array Operations
AppleAccelerate provides accelerated element-wise math operations via Apple's vecLib:
using AppleAccelerate
X = randn(Float64, 10_000)
# Accelerated math functions (not exported to avoid conflicts)
Y = AppleAccelerate.exp(X)
Y = AppleAccelerate.sin(X)
Y = AppleAccelerate.log(X)
# Broadcasting works automatically
Y = AppleAccelerate.sin.(X)Dense Linear Algebra
AppleAccelerate automatically forwards BLAS and LAPACK calls to Apple's Accelerate framework on package load:
using AppleAccelerate
using LinearAlgebra
# All BLAS/LAPACK operations now use Accelerate
A = randn(1000, 1000)
F = lu(A) # Uses Accelerate LAPACKSparse Linear Algebra
using AppleAccelerate, SparseArrays, LinearAlgebra
A = sprandn(100, 100, 0.1)
A = A + A' + 20I # Make symmetric positive definite
b = randn(100)
import AppleAccelerate: AAFactorization, solve
f = AAFactorization(A)
x = solve(f, b)Signal Processing
using AppleAccelerate
x = randn(ComplexF64, 1024)
X = AppleAccelerate.fft(x)
x_recovered = AppleAccelerate.ifft(X)