#![warn(missing_docs)]
mod device;
mod error;
#[cfg(any(feature = "cuda", feature = "opencl"))]
mod program;
#[cfg(feature = "cuda")]
pub mod cuda;
#[cfg(feature = "opencl")]
pub mod opencl;
pub use device::{Device, DeviceUuid, Framework, PciId, UniqueId, Vendor};
pub use error::GPUError;
#[cfg(any(feature = "cuda", feature = "opencl"))]
pub use program::Program;
#[cfg(not(any(feature = "cuda", feature = "opencl")))]
compile_error!("At least one of the features `cuda` or `opencl` must be enabled.");
#[derive(Debug)]
pub struct LocalBuffer<T> {
length: usize,
_phantom: std::marker::PhantomData<T>,
}
impl<T> LocalBuffer<T> {
pub fn new(length: usize) -> Self {
LocalBuffer::<T> {
length,
_phantom: std::marker::PhantomData,
}
}
}