Skip to main content

bb_ops/backends/
mod.rs

1//! Concrete backend implementations. Each backend (cpu, cuda, …)
2//! is one self-contained unit under `bb_ops::backends::<name>`.
3
4#[cfg(feature = "cpu-backend")]
5pub mod cpu;
6
7/// Anchor the CPU backend's symbols + inventory submission against
8/// linker DCE.
9#[cfg(feature = "cpu-backend")]
10pub fn link_force() {
11    use std::hint::black_box;
12    black_box(std::any::TypeId::of::<cpu::CpuBackend>());
13    black_box(cpu::CpuBackend::new());
14}