use super::context::MetalNativeContext;
use crate::error::{HiveGpuError, Result};
use crate::types::{GpuDistanceMetric, GpuSearchResult, GpuVector, HnswConfig};
use std::sync::Arc;
#[cfg(all(target_os = "macos", feature = "metal-native"))]
#[derive(Debug)]
pub struct MetalNativeHnswGraph {
context: Arc<MetalNativeContext>,
dimension: usize,
metric: GpuDistanceMetric,
config: HnswConfig,
}
#[cfg(all(target_os = "macos", feature = "metal-native"))]
impl MetalNativeHnswGraph {
pub fn new(
context: Arc<MetalNativeContext>,
dimension: usize,
metric: GpuDistanceMetric,
config: HnswConfig,
) -> Result<Self> {
Ok(Self {
context,
dimension,
metric,
config,
})
}
pub fn build_graph(&mut self, vectors: &[GpuVector]) -> Result<()> {
Err(HiveGpuError::Other(
"HNSW graph construction not implemented yet".to_string(),
))
}
pub fn search(&self, query: &[f32], k: usize) -> Result<Vec<GpuSearchResult>> {
Err(HiveGpuError::Other(
"HNSW search not implemented yet".to_string(),
))
}
}