You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/24 22:12:12 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #2920: Use portable simd instead of packed_simd dependency

tustvold commented on code in PR #2920:
URL: https://github.com/apache/arrow-rs/pull/2920#discussion_r1003816920


##########
arrow/src/datatypes/numeric.rs:
##########
@@ -337,34 +240,34 @@ macro_rules! make_numeric_type {
     };
 }
 
-make_numeric_type!(Int8Type, i8, i8x64, m8x64);
-make_numeric_type!(Int16Type, i16, i16x32, m16x32);
-make_numeric_type!(Int32Type, i32, i32x16, m32x16);
-make_numeric_type!(Int64Type, i64, i64x8, m64x8);
-make_numeric_type!(UInt8Type, u8, u8x64, m8x64);
-make_numeric_type!(UInt16Type, u16, u16x32, m16x32);
-make_numeric_type!(UInt32Type, u32, u32x16, m32x16);
-make_numeric_type!(UInt64Type, u64, u64x8, m64x8);
-make_numeric_type!(Float32Type, f32, f32x16, m32x16);
-make_numeric_type!(Float64Type, f64, f64x8, m64x8);
-
-make_numeric_type!(TimestampSecondType, i64, i64x8, m64x8);
-make_numeric_type!(TimestampMillisecondType, i64, i64x8, m64x8);
-make_numeric_type!(TimestampMicrosecondType, i64, i64x8, m64x8);
-make_numeric_type!(TimestampNanosecondType, i64, i64x8, m64x8);
-make_numeric_type!(Date32Type, i32, i32x16, m32x16);
-make_numeric_type!(Date64Type, i64, i64x8, m64x8);
-make_numeric_type!(Time32SecondType, i32, i32x16, m32x16);
-make_numeric_type!(Time32MillisecondType, i32, i32x16, m32x16);
-make_numeric_type!(Time64MicrosecondType, i64, i64x8, m64x8);
-make_numeric_type!(Time64NanosecondType, i64, i64x8, m64x8);
-make_numeric_type!(IntervalYearMonthType, i32, i32x16, m32x16);
-make_numeric_type!(IntervalDayTimeType, i64, i64x8, m64x8);
-make_numeric_type!(IntervalMonthDayNanoType, i128, i128x4, m128x4);
-make_numeric_type!(DurationSecondType, i64, i64x8, m64x8);
-make_numeric_type!(DurationMillisecondType, i64, i64x8, m64x8);
-make_numeric_type!(DurationMicrosecondType, i64, i64x8, m64x8);
-make_numeric_type!(DurationNanosecondType, i64, i64x8, m64x8);
+make_numeric_type!(Int8Type, i8, i8x64, mask8x64);
+make_numeric_type!(Int16Type, i16, i16x32, mask16x32);
+make_numeric_type!(Int32Type, i32, i32x16, mask32x16);
+make_numeric_type!(Int64Type, i64, i64x8, mask64x8);
+make_numeric_type!(UInt8Type, u8, u8x64, mask8x64);
+make_numeric_type!(UInt16Type, u16, u16x32, mask16x32);
+make_numeric_type!(UInt32Type, u32, u32x16, mask32x16);
+make_numeric_type!(UInt64Type, u64, u64x8, mask64x8);
+make_numeric_type!(Float32Type, f32, f32x16, mask32x16);
+make_numeric_type!(Float64Type, f64, f64x8, mask64x8);
+
+make_numeric_type!(TimestampSecondType, i64, i64x8, mask64x8);
+make_numeric_type!(TimestampMillisecondType, i64, i64x8, mask64x8);
+make_numeric_type!(TimestampMicrosecondType, i64, i64x8, mask64x8);
+make_numeric_type!(TimestampNanosecondType, i64, i64x8, mask64x8);
+make_numeric_type!(Date32Type, i32, i32x16, mask32x16);
+make_numeric_type!(Date64Type, i64, i64x8, mask64x8);
+make_numeric_type!(Time32SecondType, i32, i32x16, mask32x16);
+make_numeric_type!(Time32MillisecondType, i32, i32x16, mask32x16);
+make_numeric_type!(Time64MicrosecondType, i64, i64x8, mask64x8);
+make_numeric_type!(Time64NanosecondType, i64, i64x8, mask64x8);
+make_numeric_type!(IntervalYearMonthType, i32, i32x16, mask32x16);
+make_numeric_type!(IntervalDayTimeType, i64, i64x8, mask64x8);
+// make_numeric_type!(IntervalMonthDayNanoType, i128, i32x4, mask32x4); // TODO: simd types are wrong since i128 is not supported (https://github.com/rust-lang/portable-simd/issues/108)

Review Comment:
   This is likely to cause problems for decimals as well - see #2881. I wonder if we might be able to find a better way to fallback to non-SIMD kernels for such types :thinking: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org