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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ get_unwrap = "deny"
host_endian_bytes = "deny"
if_then_some_else_none = "deny"
inconsistent_struct_constructor = "deny"
inline_always = "deny"
manual_assert = "deny"
manual_is_variant_and = "deny"
many_single_char_names = "deny"
Expand Down
2 changes: 2 additions & 0 deletions encodings/fastlanes/src/bitpacking/array/unpack_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub trait UnpackStrategy<T: PhysicalPType> {
pub struct BitPackingStrategy;

impl<T: PhysicalPType<Physical: BitPacking>> UnpackStrategy<T> for BitPackingStrategy {
#[allow(clippy::inline_always)]
#[inline(always)]
unsafe fn unpack_chunk(
&self,
Expand Down Expand Up @@ -154,6 +155,7 @@ impl<T: PhysicalPType, S: UnpackStrategy<T>> UnpackedChunks<T, S> {
})
}

#[allow(clippy::inline_always)]
#[inline(always)]
const fn elems_per_chunk(&self) -> usize {
128 * self.bit_width / size_of::<T>()
Expand Down
1 change: 1 addition & 0 deletions encodings/fastlanes/src/for/array/for_decompress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct FoRStrategy<T> {
}

impl<T: PhysicalPType<Physical = T> + FoR> UnpackStrategy<T> for FoRStrategy<T> {
#[allow(clippy::inline_always)]
#[inline(always)]
unsafe fn unpack_chunk(
&self,
Expand Down
2 changes: 2 additions & 0 deletions encodings/runend/src/decompress_bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pub fn runend_decode_typed_bool(
/// Fast path for few runs with no offset. Uses direct slice access to minimize overhead.
/// This avoids the `trimmed_ends_iter` iterator chain which adds significant overhead
/// for small numbers of runs.
#[allow(clippy::inline_always)]
#[inline(always)]
fn decode_few_runs_no_offset<E: vortex_array::dtype::IntegerPType>(
ends: &[E],
Expand Down Expand Up @@ -220,6 +221,7 @@ fn decode_bool_nullable(
}

/// Sequential decode for few runs - avoids prefill overhead.
#[allow(clippy::inline_always)]
#[inline(always)]
fn decode_nullable_sequential(
run_ends: impl Iterator<Item = usize>,
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/aggregate_fn/fns/sum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ pub(crate) fn make_zero_state(return_dtype: &DType) -> SumState {
}

/// Checked add for u64, returning true if overflow occurred.
#[allow(clippy::inline_always)]
#[inline(always)]
fn checked_add_u64(acc: &mut u64, val: u64) -> bool {
match acc.checked_add(val) {
Expand All @@ -382,6 +383,7 @@ fn checked_add_u64(acc: &mut u64, val: u64) -> bool {
}

/// Checked add for i64, returning true if overflow occurred.
#[allow(clippy::inline_always)]
#[inline(always)]
fn checked_add_i64(acc: &mut i64, val: i64) -> bool {
match acc.checked_add(val) {
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/aggregate_fn/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ pub(super) struct AggregateFnInner<V: AggregateFnVTable> {
}

impl<V: AggregateFnVTable> DynAggregateFn for AggregateFnInner<V> {
#[allow(clippy::inline_always)]
#[inline(always)]
fn as_any(&self) -> &dyn Any {
self
}

#[allow(clippy::inline_always)]
#[inline(always)]
fn id(&self) -> AggregateFnId {
V::id(&self.vtable)
Expand Down
4 changes: 4 additions & 0 deletions vortex-array/src/array/erased.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ impl ArrayRef {
}

/// Returns a reference to the `dyn DynArrayData` inside the inner.
#[allow(clippy::inline_always)]
#[inline(always)]
pub(crate) fn dyn_array(&self) -> &dyn DynArrayData {
&self.0.data
}

/// Returns a mutable reference to the inner if this is the sole owner.
#[allow(clippy::inline_always)]
#[inline(always)]
pub(crate) fn inner_mut(&mut self) -> Option<&mut ArrayInner<dyn DynArrayData>> {
Arc::get_mut(&mut self.0)
Expand Down Expand Up @@ -119,6 +121,7 @@ impl ArrayRef {
///
/// # Safety
/// The caller must guarantee the concrete type behind `dyn DynArrayData` is `ArrayData<V>`.
#[allow(clippy::inline_always)]
#[inline(always)]
pub(crate) unsafe fn downcast_inner_unchecked<V: VTable>(
self,
Expand Down Expand Up @@ -791,6 +794,7 @@ impl ArrayRef {
}

impl IntoArray for ArrayRef {
#[allow(clippy::inline_always)]
#[inline(always)]
fn into_array(self) -> ArrayRef {
self
Expand Down
3 changes: 3 additions & 0 deletions vortex-array/src/array/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ impl<V: VTable> Array<V> {
}

/// Returns the internal [`ArrayRef`].
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn as_array(&self) -> &ArrayRef {
&self.inner
Expand All @@ -361,6 +362,7 @@ impl<V: VTable> Array<V> {
}

/// Downcast the inner `ArrayRef` to `&ArrayData<V>`.
#[allow(clippy::inline_always)]
#[inline(always)]
fn downcast_inner(&self) -> &ArrayData<V> {
let any = self.inner.dyn_array().as_any();
Expand Down Expand Up @@ -508,6 +510,7 @@ impl<V: VTable> AsRef<ArrayRef> for Array<V> {
}

impl<V: VTable> IntoArray for Array<V> {
#[allow(clippy::inline_always)]
#[inline(always)]
fn into_array(self) -> ArrayRef {
self.inner
Expand Down
3 changes: 3 additions & 0 deletions vortex-array/src/arrays/bool/compute/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ fn filter_pext_fallback(src: &BitBuffer, mask_buf: &BitBuffer, true_count: usize
/// Extracted so the same logic is shared between the software and hardware paths.
/// Uses raw pointer writes instead of Vec::push to eliminate bounds checks
/// in the hot loop — we know the exact output size from true_count.
#[allow(clippy::inline_always)]
#[inline(always)]
#[allow(clippy::cast_possible_truncation)]
fn filter_inner(
Expand Down Expand Up @@ -227,6 +228,7 @@ fn filter_inner(
/// lookup table per mask byte. Each byte PEXT is a single table lookup with no
/// data dependencies between bytes, making this faster than the parallel-prefix
/// approach (~12ns vs ~18ns per word).
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn pext_fallback(src: u64, mask: u64) -> u64 {
pext_byte_lut(src, mask)
Expand Down Expand Up @@ -268,6 +270,7 @@ static BYTE_PEXT_LUT: &[u8; 256 * 256] = &{
};

/// Byte-level PEXT using precomputed lookup table.
#[allow(clippy::inline_always)]
#[inline(always)]
fn pext_byte_lut(src: u64, mask: u64) -> u64 {
let src_bytes = src.to_le_bytes();
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/arrays/filter/execute/simd_compress/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const fn compress_lut<const ROWS: usize, const BYTES: usize>(
/// The pointer contract of [`filter_slice_by_bitmap`] / [`filter_slice_mut_by_bitmap`] must hold,
/// and `bits` must only select elements that are in bounds.
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), not(miri)))]
#[allow(clippy::inline_always)]
#[inline(always)]
unsafe fn compress_tail<const IN_PLACE: bool>(
src: *const u8,
Expand Down Expand Up @@ -180,6 +181,7 @@ unsafe fn compress_tail<const IN_PLACE: bool>(
/// must not overlap `src` and must have room at `write_pos`; in-place, forward compaction must
/// guarantee `write_pos <= word_start`.
#[cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), not(miri)))]
#[allow(clippy::inline_always)]
#[inline(always)]
unsafe fn bulk_copy<const IN_PLACE: bool>(
src: *const u8,
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/arrays/filter/execute/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use vortex_mask::MaskValues;

/// Invoke `f` with each `(word, word_start, word_len)` of the mask bitmap, where `word` holds
/// the mask bits for elements `word_start..word_start + word_len` in its low `word_len` bits.
#[allow(clippy::inline_always)]
#[inline(always)]
pub(super) fn for_each_mask_word(mask: &MaskValues, mut f: impl FnMut(u64, usize, usize)) {
let bits = mask.bit_buffer();
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/arrays/fixed_width/take/avx2/gather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ macro_rules! impl_gather {
const STRIDE: usize = $STRIDE;

#[allow(unused_unsafe, clippy::cast_possible_truncation)]
#[allow(clippy::inline_always)]
#[inline(always)]
unsafe fn gather(
indices: *const $idx,
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/arrays/fixed_width/take/avx2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const fn i32_gather_can_address(values_len: usize) -> bool {
/// `size_of::<Out>()`). Each valid lane copies the initialized representation of an existing
/// `Out`; invalid lanes are masked and cause a panic before the output buffer is initialized.
/// Gather instructions tolerate the source's potentially weaker alignment.
#[allow(clippy::inline_always)]
#[inline(always)]
fn exec_take<Out, Lane, Idx, Gather>(values: &[Out], indices: &[Idx]) -> Buffer<Out>
where
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/arrays/fixed_width/take/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use vortex_buffer::BufferMut;

use crate::dtype::IntegerPType;

#[allow(clippy::inline_always)]
#[inline(always)]
pub(crate) fn take_values_scalar<T: Copy, I: IntegerPType>(
values: &[T],
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/arrays/scalar_fn/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl Display for ScalarFnData {

impl ScalarFnData {
/// Get the scalar function bound to this array.
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn scalar_fn(&self) -> &ScalarFnRef {
&self.scalar_fn
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/arrays/varbin/compute/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ fn collect_lane_bits<P: IntegerPType>(
///
/// Offsets at null positions are not validated, so an out-of-bounds or inverted range is
/// possible there; such lanes answer `false`, and validity masks them out of the result anyway.
#[allow(clippy::inline_always)]
#[inline(always)]
fn value_eq(bytes: &[u8], start: usize, end: usize, constant: &[u8]) -> bool {
// A lane can only match when its length equals the constant's, so lanes of a different
Expand All @@ -164,6 +165,7 @@ fn value_eq(bytes: &[u8], start: usize, end: usize, constant: &[u8]) -> bool {

/// Order `bytes[start..end]` against `constant`, treating the unvalidated garbage ranges that
/// can appear at null positions as empty; validity masks those lanes out of the result anyway.
#[allow(clippy::inline_always)]
#[inline(always)]
fn value_cmp(bytes: &[u8], start: usize, end: usize, constant: &[u8]) -> Ordering {
bytes.get(start..end).unwrap_or_default().cmp(constant)
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/arrays/varbinview/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl VarBinViewArray {

/// Iterates over all valid, non-inlined views, calling the provided
/// closure for each one.
#[allow(clippy::inline_always)]
#[inline(always)]
fn iter_valid_views<F>(&self, ctx: &mut ExecutionCtx, mut f: F) -> VortexResult<()>
where
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/dtype/decimal/precision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ impl<D: NativeDecimalType> PrecisionScale<D> {
}

/// The precision is the number of significant figures that the decimal tracks.
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn precision(&self) -> u8 {
self.precision.get()
}

/// The scale is the maximum number of digits relative to the decimal point.
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn scale(&self) -> i8 {
self.scale
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ pub struct AnyArray;
impl Matcher for AnyArray {
type Match<'a> = &'a ArrayRef;

#[allow(clippy::inline_always)]
#[inline(always)]
fn matches(_array: &ArrayRef) -> bool {
true
}

#[allow(clippy::inline_always)]
#[inline(always)]
fn try_match(array: &ArrayRef) -> Option<Self::Match<'_>> {
Some(array)
Expand Down
1 change: 1 addition & 0 deletions vortex-array/src/scalar_fn/fns/binary/compare/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ fn compare_primitive_typed<T: NativePType>(
Ok(BoolArray::try_new(bits, validity)?.into_array())
}

#[allow(clippy::inline_always)]
#[inline(always)]
fn apply_op<T: NativePType>(lhs: T, rhs: T, op: CompareOperator) -> bool {
match op {
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/scalar_fn/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ pub(super) trait DynScalarFn: 'static + Send + Sync + super::sealed::Sealed {
}

impl<V: ScalarFnVTable> DynScalarFn for TypedScalarFnInstance<V> {
#[allow(clippy::inline_always)]
#[inline(always)]
fn as_any(&self) -> &dyn Any {
self
}

#[allow(clippy::inline_always)]
#[inline(always)]
fn id(&self) -> ScalarFnId {
V::id(&self.vtable)
Expand Down
2 changes: 2 additions & 0 deletions vortex-array/src/test_harness/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ pub fn trace_op_with<T>(
}

/// Returns true when the current thread has an active trace recorder.
#[allow(clippy::inline_always)]
#[inline(always)]
pub(crate) fn is_active() -> bool {
if ACTIVE_TRACE_COUNT.load(Ordering::Relaxed) == 0 {
Expand All @@ -270,6 +271,7 @@ pub(crate) fn is_active() -> bool {
TRACE_INTEREST.with(|interest| interest.get().is_active())
}

#[allow(clippy::inline_always)]
#[inline(always)]
fn attempts_enabled() -> bool {
if ATTEMPTS_TRACE_COUNT.load(Ordering::Relaxed) == 0 {
Expand Down
2 changes: 2 additions & 0 deletions vortex-buffer/src/bit/buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,14 @@ impl BitBuffer {
}

/// Offset of the start of the buffer in bits.
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn offset(&self) -> usize {
self.offset
}

/// Get a reference to the underlying buffer.
#[allow(clippy::inline_always)]
#[inline(always)]
pub fn inner(&self) -> &ByteBuffer {
&self.buffer
Expand Down
Loading
Loading