mod ilu_ic;
mod levels;
mod primitives;
mod qr;
mod trsv;
mod utils;
pub use ilu_ic::*;
pub use levels::*;
pub use primitives::*;
pub use qr::*;
pub use trsv::*;
pub use utils::*;
pub(crate) use super::loader::{get_kernel_function, get_or_load_module, launch_config};
use crate::error::Error;
pub const SPARSE_LINALG_MODULE: &str = "sparse_linalg";
pub(crate) const BLOCK_SIZE: u32 = 256;
#[inline]
pub(crate) fn grid_size(n: u32) -> u32 {
(n + BLOCK_SIZE - 1) / BLOCK_SIZE
}
#[inline]
pub(crate) fn launch_error(kernel_name: &str, e: impl std::fmt::Debug) -> Error {
Error::Internal(format!("CUDA {} launch failed: {:?}", kernel_name, e))
}