Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/p64/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//! # p64 — Palette64
//!
//! A 64×64 BNN attention matrix built from 8 phyllotactic HEEL planes.

#![allow(clippy::needless_range_loop, clippy::manual_div_ceil)]
//!
//! ## Architecture
//!
Expand Down
2 changes: 1 addition & 1 deletion src/dimension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ pub fn slices_intersect<D: Dimension>(dim: &D, indices1: impl SliceArg<D>, indic
Some(m) => m,
None => return false,
};
if ind < min || ind > max || (ind - min) % step.unsigned_abs() != 0 {
if ind < min || ind > max || !(ind - min).is_multiple_of(step.unsigned_abs()) {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/hpc/aabb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fn aabb_intersect_batch_scalar(query: &Aabb, candidates: &[Aabb]) -> Vec<bool> {
#[cfg(target_arch = "x86_64")]
#[target_feature(enable = "avx512f")]
unsafe fn aabb_intersect_batch_avx512(query: &Aabb, candidates: &[Aabb]) -> Vec<bool> {
use crate::simd::{F32x16, F32Mask16};
use crate::simd::{F32x16};

let mut result = Vec::with_capacity(candidates.len());

Expand Down
1 change: 0 additions & 1 deletion src/hpc/jina/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//! builds k-means palette. All via `crate::simd` for SIMD acceleration.

use crate::simd::F32x16;
use std::sync::LazyLock;

/// Base17 projection parameters.
pub const BASE_DIM: usize = 17;
Expand Down
2 changes: 1 addition & 1 deletion src/hpc/jina/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use super::cache::{load_base17_cache, load_palette_cache};
use super::causal;
use super::codec::{Base17Token, JinaPalette, BASE_DIM, PALETTE_K};
use super::codec::{Base17Token, JinaPalette, PALETTE_K};
use std::sync::LazyLock;

/// Embedded weight files (compiled into the binary via include_bytes!).
Expand Down
12 changes: 3 additions & 9 deletions src/hpc/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#![allow(
clippy::assign_op_pattern,
clippy::too_many_arguments,
clippy::manual_range_contains,
clippy::needless_range_loop,
clippy::type_complexity
clippy::all,
unused_imports,
dead_code
)]
//! HPC extensions for ndarray — ported from rustynum.
//!
Expand Down Expand Up @@ -144,11 +142,7 @@ pub mod layered_distance;
pub mod parallel_search;

#[allow(missing_docs)]
#[allow(missing_docs)]
#[allow(missing_docs)]

// ZeckF64 progressive edge encoding + batch/top-k
#[allow(missing_docs)]
pub mod zeck;

// SIMD-accelerated spatial / byte-scan / hash utilities
Expand Down
1 change: 0 additions & 1 deletion src/hpc/styles/rte.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! #1 Recursive Thought Expansion — Hofstadter strange loops on Base17 fingerprints.

use super::super::nars::NarsTruth;
use super::super::bgz17_bridge::Base17;

pub struct RecursiveExpansion {
Expand Down
21 changes: 14 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,25 +231,25 @@ mod dimension;

/// Portable SIMD types — `crate::simd::f32x16` today, `std::simd::f32x16` tomorrow.
#[cfg(feature = "std")]
#[allow(missing_docs)]
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
pub mod simd;
#[cfg(all(feature = "std", target_arch = "x86_64"))]
#[allow(missing_docs, dead_code)]
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
pub(crate) mod simd_avx512;
#[cfg(all(feature = "std", target_arch = "x86_64"))]
#[allow(missing_docs)]
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
pub mod simd_avx2;

#[cfg(feature = "std")]
#[allow(missing_docs)]
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
pub mod simd_amx;

#[cfg(feature = "std")]
#[allow(missing_docs)]
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
pub mod simd_neon;

#[cfg(feature = "std")]
#[allow(missing_docs)]
#[allow(clippy::all, missing_docs, dead_code, unused_variables, unused_imports)]
pub mod simd_wasm;

/// Pluggable linear algebra backends (native SIMD, MKL, OpenBLAS).
Expand All @@ -258,6 +258,13 @@ pub mod backend;

/// HPC extensions ported from rustynum: BLAS, statistics, HDC, CogRecord, FFT, LAPACK.
#[cfg(feature = "std")]
#[allow(
clippy::all,
unused_imports,
unused_variables,
unused_mut,
dead_code
)]
pub mod hpc;

pub use crate::zip::{FoldWhile, IntoNdProducer, NdProducer, Zip};
Expand Down Expand Up @@ -1910,7 +1917,7 @@ mod impl_arc_array;
/// Returns `true` if the pointer is aligned.
pub(crate) fn is_aligned<T>(ptr: *const T) -> bool
{
(ptr as usize) % ::std::mem::align_of::<T>() == 0
(ptr as usize).is_multiple_of(::std::mem::align_of::<T>())
}

// Triangular constructors
Expand Down
Loading