Skip to main content

oxidelake_device/
lib.rs

1//! Hardware abstraction layer (docs/SPEC.md ยง2.2): the object-safe [`GpuBackend`]
2//! trait, opaque backend-tagged handles, the always-available [`CpuBackend`]
3//! (the correctness reference), the opt-in CUDA and Metal backends, and the
4//! [`HardwareDetector`] that picks one at runtime.
5//!
6//! GPU backends are cargo features (`cuda`, `metal`) and never part of the
7//! default build; `metal` is additionally macOS-only.
8//!
9//! Dependency direction: depends on `oxidelake-core` and `oxidelake-memory`.
10
11pub mod args;
12pub mod backend;
13pub mod columns;
14pub mod cpu;
15pub mod detector;
16pub mod handles;
17mod join_slots;
18
19#[cfg(feature = "cuda")]
20pub mod cuda;
21
22#[cfg(all(feature = "metal", target_os = "macos"))]
23pub mod metal;
24
25pub use args::{
26    AggregateArgs, FilterProjectArgs, HashJoinArgs, JoinBuildArgs, JoinProbeArgs,
27    VectorDistanceArgs,
28};
29pub use backend::{GpuBackend, MemoryInfo};
30pub use cpu::CpuBackend;
31pub use detector::{Availability, BACKEND_ENV, HardwareDetector};
32pub use handles::{
33    DeviceBatch, DeviceBuffer, DeviceJoinMatches, DeviceJoinTable, DeviceStream, HostBuffer,
34};
35pub use oxidelake_core::{BackendKind, DeviceId};