Ref. + AVX code & generic tests + benches (#85)

This commit is contained in:
Jean-Philippe Bossuat
2025-09-15 16:16:11 +02:00
committed by GitHub
parent 99b9e3e10e
commit 56dbd29c59
286 changed files with 27797 additions and 7270 deletions

View File

@@ -20,7 +20,30 @@ pub struct Module<B: Backend> {
_marker: PhantomData<B>,
}
unsafe impl<B: Backend> Sync for Module<B> {}
unsafe impl<B: Backend> Send for Module<B> {}
impl<B: Backend> Module<B> {
#[allow(clippy::missing_safety_doc)]
#[inline]
pub fn new_marker(n: u64) -> Self {
Self {
ptr: NonNull::dangling(),
n,
_marker: PhantomData,
}
}
#[allow(clippy::missing_safety_doc)]
#[inline]
pub unsafe fn from_nonnull(ptr: NonNull<B::Handle>, n: u64) -> Self {
Self {
ptr,
n,
_marker: PhantomData,
}
}
/// Construct from a raw pointer managed elsewhere.
/// SAFETY: `ptr` must be non-null and remain valid for the lifetime of this Module.
#[inline]