Skip to content

Commit 6b439f7

Browse files
committed
chore: only use #[inline] for non-generic & pub fns
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
1 parent 7899299 commit 6b439f7

52 files changed

Lines changed: 11 additions & 137 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

encodings/alp/src/alp/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pub trait ALPFloat: private::Sealed + Float + Display + NativePType {
8989
const IF10: &'static [Self];
9090

9191
/// Round to the nearest floating integer by shifting in and out of the low precision range.
92-
#[inline]
9392
fn fast_round(self) -> Self {
9493
(self + Self::SWEET) - Self::SWEET
9594
}
@@ -132,7 +131,6 @@ pub trait ALPFloat: private::Sealed + Float + Display + NativePType {
132131
best_exp
133132
}
134133

135-
#[inline]
136134
fn estimate_encoded_size(encoded: &[Self::ALPInt], patches: &[Self]) -> usize {
137135
let bits_per_encoded = encoded
138136
.iter()
@@ -204,7 +202,6 @@ pub trait ALPFloat: private::Sealed + Float + Display + NativePType {
204202
)
205203
}
206204

207-
#[inline]
208205
fn encode_single(value: Self, exponents: Exponents) -> Option<Self::ALPInt> {
209206
let encoded = Self::encode_single_unchecked(value, exponents);
210207
let decoded = Self::decode_single(encoded, exponents);

encodings/fastlanes/src/bit_transpose/aarch64.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ static SCATTER_8X8_NEON: [[u8; 16]; 4] = [
114114

115115
/// Perform 8x8 bit transpose on two u64s packed in a `uint64x2_t`.
116116
#[allow(unsafe_op_in_unsafe_fn)]
117-
#[inline]
118117
unsafe fn bit_transpose_8x8_neon(mut v: uint64x2_t) -> uint64x2_t {
119118
let mask1 = vdupq_n_u64(TRANSPOSE_2X2);
120119
let t = vandq_u64(veorq_u64(v, vshrq_n_u64::<7>(v)), mask1);

encodings/fastlanes/src/bit_transpose/scalar.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use crate::bit_transpose::TRANSPOSE_8X8;
1515
#[allow(dead_code)]
1616
pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
1717
// Helper to perform 8x8 bit transpose on a u64 (each byte becomes a row)
18-
#[inline]
1918
fn transpose_8x8(mut x: u64) -> u64 {
2019
// Step 1: Transpose 2x2 bit blocks
2120
let t = (x ^ (x >> 7)) & TRANSPOSE_2X2;
@@ -29,7 +28,6 @@ pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
2928
}
3029

3130
// Helper to gather 8 bytes at stride 16 into a u64
32-
#[inline]
3331
fn gather(input: &[u8; 128], base: usize) -> u64 {
3432
u64::from(input[base])
3533
| (u64::from(input[base + 16]) << 8)
@@ -89,7 +87,6 @@ pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
8987
#[inline(never)]
9088
#[allow(dead_code)]
9189
pub fn untranspose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
92-
#[inline]
9390
fn transpose_8x8(mut x: u64) -> u64 {
9491
let t = (x ^ (x >> 7)) & TRANSPOSE_2X2;
9592
x = x ^ t ^ (t << 7);
@@ -99,7 +96,6 @@ pub fn untranspose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
9996
x ^ t ^ (t << 28)
10097
}
10198

102-
#[inline]
10399
fn gather_transposed(input: &[u8; 128], base_group: usize, offset: usize) -> u64 {
104100
let mut result: u64 = 0;
105101
for bit_pos in 0..8 {
@@ -108,7 +104,6 @@ pub fn untranspose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
108104
result
109105
}
110106

111-
#[inline]
112107
fn scatter(output: &mut [u8; 128], base: usize, val: u64) {
113108
output[base] = val as u8;
114109
output[base + 16] = (val >> 8) as u8;

encodings/fastlanes/src/bit_transpose/x86.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ pub fn has_vbmi() -> bool {
4949
#[allow(unsafe_op_in_unsafe_fn)]
5050
pub unsafe fn transpose_bits_bmi2(input: &[u8; 128], output: &mut [u8; 128]) {
5151
// Helper to gather 8 bytes at stride 16 into a u64
52-
#[inline]
5352
fn gather(input: &[u8; 128], base: usize) -> u64 {
5453
(input[base] as u64)
5554
| ((input[base + 16] as u64) << 8)
@@ -238,7 +237,6 @@ pub unsafe fn transpose_bits_bmi2(input: &[u8; 128], output: &mut [u8; 128]) {
238237
#[allow(unsafe_op_in_unsafe_fn)]
239238
pub unsafe fn untranspose_bits_bmi2(input: &[u8; 128], output: &mut [u8; 128]) {
240239
// Helper: scatter a u64 to 8 output bytes at stride 16
241-
#[inline]
242240
fn scatter(output: &mut [u8; 128], base: usize, val: u64) {
243241
output[base] = val as u8;
244242
output[base + 16] = (val >> 8) as u8;

encodings/fastlanes/src/bitpacking/array/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ impl BitPackedArray {
210210
}
211211

212212
/// Access the slice of packed values as an array of `T`
213-
#[inline]
214213
pub fn packed_slice<T: NativePType + BitPacking>(&self) -> &[T] {
215214
let packed_bytes = self.packed().as_host();
216215
let packed_ptr: *const T = packed_bytes.as_ptr().cast();

encodings/fastlanes/src/bitpacking/array/unpack_iter.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,10 @@ impl<T: PhysicalPType, S: UnpackStrategy<T>> UnpackedChunks<T, S> {
256256
})
257257
}
258258

259-
#[inline]
260259
fn last_chunk_is_sliced(&self) -> bool {
261260
self.last_chunk_length != 0
262261
}
263262

264-
#[inline]
265263
fn first_chunk_is_sliced(&self) -> bool {
266264
self.offset != 0
267265
}

encodings/runend/src/iter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::cmp::min;
66
use vortex_array::dtype::IntegerPType;
77
use vortex_error::vortex_panic;
88

9-
#[inline]
109
pub fn trimmed_ends_iter<E: IntegerPType>(
1110
run_ends: &[E],
1211
offset: usize,

vortex-array/src/aggregate_fn/fns/sum.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ impl AggregateFnVTable for Sum {
143143
Ok(result)
144144
}
145145

146-
#[inline]
147146
fn is_saturated(&self, partial: &Self::Partial) -> bool {
148147
partial.current.is_none()
149148
}

vortex-array/src/array/mod.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ pub trait DynArray:
168168
}
169169

170170
impl DynArray for Arc<dyn DynArray> {
171-
#[inline]
172171
fn as_any(&self) -> &dyn Any {
173172
DynArray::as_any(self.as_ref())
174173
}
@@ -177,17 +176,14 @@ impl DynArray for Arc<dyn DynArray> {
177176
self
178177
}
179178

180-
#[inline]
181179
fn to_array(&self) -> ArrayRef {
182180
self.clone()
183181
}
184182

185-
#[inline]
186183
fn len(&self) -> usize {
187184
self.as_ref().len()
188185
}
189186

190-
#[inline]
191187
fn dtype(&self) -> &DType {
192188
self.as_ref().dtype()
193189
}
@@ -196,12 +192,10 @@ impl DynArray for Arc<dyn DynArray> {
196192
self.as_ref().vtable()
197193
}
198194

199-
#[inline]
200195
fn encoding_id(&self) -> ArrayId {
201196
self.as_ref().encoding_id()
202197
}
203198

204-
#[inline]
205199
fn slice(&self, range: Range<usize>) -> VortexResult<ArrayRef> {
206200
self.as_ref().slice(range)
207201
}
@@ -214,47 +208,38 @@ impl DynArray for Arc<dyn DynArray> {
214208
self.as_ref().take(indices)
215209
}
216210

217-
#[inline]
218211
fn scalar_at(&self, index: usize) -> VortexResult<Scalar> {
219212
self.as_ref().scalar_at(index)
220213
}
221214

222-
#[inline]
223215
fn is_valid(&self, index: usize) -> VortexResult<bool> {
224216
self.as_ref().is_valid(index)
225217
}
226218

227-
#[inline]
228219
fn is_invalid(&self, index: usize) -> VortexResult<bool> {
229220
self.as_ref().is_invalid(index)
230221
}
231222

232-
#[inline]
233223
fn all_valid(&self) -> VortexResult<bool> {
234224
self.as_ref().all_valid()
235225
}
236226

237-
#[inline]
238227
fn all_invalid(&self) -> VortexResult<bool> {
239228
self.as_ref().all_invalid()
240229
}
241230

242-
#[inline]
243231
fn valid_count(&self) -> VortexResult<usize> {
244232
self.as_ref().valid_count()
245233
}
246234

247-
#[inline]
248235
fn invalid_count(&self) -> VortexResult<usize> {
249236
self.as_ref().invalid_count()
250237
}
251238

252-
#[inline]
253239
fn validity(&self) -> VortexResult<Validity> {
254240
self.as_ref().validity()
255241
}
256242

257-
#[inline]
258243
fn validity_mask(&self) -> VortexResult<Mask> {
259244
self.as_ref().validity_mask()
260245
}

vortex-array/src/arrays/decimal/compute/min_max.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ impl MinMaxKernel for Decimal {
2828

2929
register_kernel!(MinMaxKernelAdapter(Decimal).lift());
3030

31-
#[inline]
3231
fn compute_min_max_with_validity<D>(array: &DecimalArray) -> VortexResult<Option<MinMaxResult>>
3332
where
3433
D: Into<DecimalValue> + NativeDecimalType,

0 commit comments

Comments
 (0)