#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::panic)]
pub mod adaptive;
pub mod error;
pub mod gpu_ml;
pub mod gpu_terrain;
pub mod kernels;
pub mod memory_compaction;
pub mod memory_pool;
pub mod multi_gpu;
pub mod pipeline_builder;
pub mod profiling;
pub mod shader_compiler;
pub use adaptive::{
AdaptiveConfig, AdaptiveSelector, Algorithm, AlgorithmStats, DeviceInfo, ExecutionStrategy,
TuningParams, WorkloadInfo,
};
pub use error::{GpuAdvancedError, Result};
pub use gpu_ml::{ActivationType, GpuMlInference, InferenceStats, PoolType};
pub use gpu_terrain::{GpuTerrainAnalyzer, TerrainMetrics};
pub use kernels::{
EdgeDetectionKernel, FftKernel, HistogramEqKernel, KernelParams, KernelRegistry,
MatrixMultiplyKernel, MorphologyKernel, TextureAnalysisKernel,
};
pub use memory_compaction::{
CompactionConfig, CompactionResult, CompactionStats, CompactionStrategy, FragmentationInfo,
MemoryCompactor,
};
pub use memory_pool::{MemoryAllocation, MemoryPool, MemoryPoolStats};
pub use multi_gpu::{
GpuDevice, GpuDeviceInfo, MultiGpuManager, SelectionStrategy,
affinity::{AffinityGuard, AffinityManager, AffinityStats},
device_manager::{DeviceCapabilities, DeviceFilter, DeviceManager, DevicePerformanceClass},
load_balancer::{LoadBalancer, LoadStats},
sync::{Barrier, Event, Fence, GpuSemaphore, SemaphoreGuard, SyncManager, SyncStats},
work_queue::{BatchSubmitter, WorkQueue, WorkStealingQueue},
};
pub use pipeline_builder::{
Pipeline, PipelineBuilder, PipelineConfig, PipelineInfo, PipelineStage,
};
pub use profiling::{
BottleneckKind, BottleneckSeverity, GpuProfiler, KernelStats, PerformanceBottleneck,
ProfileSession, ProfilingConfig, ProfilingMetrics, ProfilingReport,
};
pub use shader_compiler::{
CompiledShader, CompilerStats, ShaderCompiler, ShaderPreprocessor,
analyzer::{PerformanceClass, ShaderAnalysis, ShaderAnalyzer},
cache::{CacheStats, ShaderCache},
optimizer::{OptimizationConfig, OptimizationLevel, OptimizationMetrics, ShaderOptimizer},
};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const NAME: &str = env!("CARGO_PKG_NAME");
pub fn info() -> LibraryInfo {
LibraryInfo {
name: NAME.to_string(),
version: VERSION.to_string(),
description: "Advanced GPU computing with multi-GPU support for OxiGDAL".to_string(),
}
}
#[derive(Debug, Clone)]
pub struct LibraryInfo {
pub name: String,
pub version: String,
pub description: String,
}
impl LibraryInfo {
pub fn print(&self) {
println!("{} v{}", self.name, self.version);
println!("{}", self.description);
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_library_info() {
let info = info();
assert_eq!(info.name, NAME);
assert_eq!(info.version, VERSION);
assert!(!info.description.is_empty());
}
#[test]
fn test_version() {
assert!(!VERSION.is_empty());
assert!(VERSION.contains('.'));
}
}