# OxiGDAL GPU
GPU-accelerated geospatial operations for OxiGDAL using WGPU.
## Features
- **Cross-platform GPU support**: Vulkan, Metal, DX12, WebGPU
- **Element-wise operations**: Add, subtract, multiply, divide, etc.
- **Statistical operations**: Parallel reduction, histogram, min/max
- **Resampling**: Nearest neighbor, bilinear, bicubic interpolation
- **Convolution**: Gaussian blur, edge detection, custom filters
- **Pipeline API**: Chain operations without CPU transfers
- **Pure Rust**: No C/C++ dependencies
## Quick Start
```rust
use oxigdal_gpu::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize GPU context
let gpu = GpuContext::new().await?;
// Create compute pipeline
let data: Vec<f32> = vec![1.0; 1024 * 1024];
let result = ComputePipeline::from_data(&gpu, &data, 1024, 1024)?
.gaussian_blur(2.0)?
.multiply(1.5)?
.clamp(0.0, 255.0)?
.read_blocking()?;
Ok(())
}
```
## Performance
GPU acceleration provides 10-100x speedup for large rasters:
| Element-wise ops | 100 ms | 1 ms | 100x |
| Gaussian blur | 500 ms | 5 ms | 100x |
| Resampling | 200 ms | 10 ms | 20x |
| Statistics | 150 ms | 2 ms | 75x |
## Requirements
- Rust 1.85+
- GPU with Vulkan/Metal/DX12/WebGPU support
## License
Apache-2.0