1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! GPU-accelerated vector operations for rustyhdf5.
//!
//! Uses wgpu compute shaders (WGSL) for cross-platform GPU acceleration.
//! Supports CUDA, Metal, Vulkan, and DirectX 12 backends via wgpu.
//!
//! # Usage
//!
//! ```no_run
//! use rustyhdf5_gpu::GpuAccelerator;
//!
//! // Fall back to CPU if GPU is not available
//! let mut gpu = match GpuAccelerator::new() {
//! Ok(g) => g,
//! Err(_) => { /* use CPU path */ return; }
//! };
//!
//! // Upload vectors once
//! let vectors = vec![0.0f32; 1000 * 128]; // 1000 vectors of dim 128
//! let norms = vec![1.0f32; 1000];
//! gpu.upload_vectors(&vectors, 128).unwrap();
//! gpu.upload_norms(&norms).unwrap();
//!
//! // Search many times
//! let query = vec![1.0f32; 128];
//! let results = gpu.cosine_search(&query, 10).unwrap();
//! ```
pub use DeviceInfo;
pub use ;
pub use GpuAccelerator;
/// Stub when compiled without GPU support.
;