use crate::backend::Backend;
use crate::scalar::{Complex, Real, Scalar};
mod buffer;
mod device;
mod error;
mod plan;
pub use buffer::CudaBuffer;
pub use device::{CudaDevice, DeviceOptions};
pub use error::CudaError;
pub use plan::{CudaC2cPlan, CudaC2rPlan, CudaR2cPlan};
#[derive(Clone, Copy, Debug)]
pub struct CudaBackend;
impl CudaBackend {
pub fn new_device(options: DeviceOptions) -> Result<CudaDevice, CudaError> {
CudaDevice::new(options)
}
}
impl Backend for CudaBackend {
type Device = CudaDevice;
type Buffer<T: Scalar> = CudaBuffer<T>;
type C2cPlan<T: Complex> = CudaC2cPlan<T>;
type R2cPlan<F: Real> = CudaR2cPlan<F>;
type C2rPlan<F: Real> = CudaC2rPlan<F>;
type Error = CudaError;
const NAME: &'static str = "cuda";
}