kronos_compute/implementation/
mod.rs

1//! Actual implementation of Kronos compute APIs
2
3use std::sync::Mutex;
4use log::warn;
5
6pub mod error;
7pub mod instance;
8pub mod device;
9pub mod memory;
10pub mod buffer;
11pub mod pipeline;
12pub mod descriptor;
13pub mod sync;
14// REMOVED: pub mod icd_loader;
15// REMOVED: pub mod forward;
16// REMOVED: pub mod persistent_descriptors;  // Uses ICD
17// REMOVED: pub mod barrier_policy;         // Uses ICD
18// REMOVED: pub mod timeline_batching;      // Uses ICD
19// REMOVED: pub mod pool_allocator;         // Uses ICD
20
21#[cfg(test)]
22mod tests;
23
24// Re-export all implementation functions
25pub use instance::*;
26pub use device::*;
27pub use memory::*;
28pub use buffer::*;
29pub use pipeline::*;
30pub use descriptor::*;
31pub use sync::*;
32
33// Kronos initialization state
34lazy_static::lazy_static! {
35    pub static ref KRONOS_INITIALIZED: Mutex<bool> = Mutex::new(false);
36}
37
38/// Initialize Kronos - pure Rust implementation
39pub fn initialize_kronos() -> Result<(), error::KronosError> {
40    log::info!("=== Kronos Pure Rust Implementation Initializing ===");
41    let mut initialized = KRONOS_INITIALIZED.lock()?;
42    if *initialized {
43        log::info!("Kronos already initialized");
44        return Ok(());
45    }
46    
47    // Initialize our pure Rust implementation
48    // No ICD loading, no system Vulkan dependency!
49    *initialized = true;
50    log::info!("Kronos initialized successfully - pure Rust compute implementation");
51    Ok(())
52}
53