Skip to content

Commit

Permalink
Support auto-vectorization for min/max using multiversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Dandandan committed Apr 20, 2021
1 parent 5479e19 commit 3fbdd03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ flatbuffers = "^0.8"
hex = "0.4"
prettytable-rs = { version = "0.8.0", optional = true }
lexical-core = "^0.7"
multiversion = "0.6.1"

[features]
default = []
Expand Down
3 changes: 3 additions & 0 deletions arrow/src/compute/kernels/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

//! Defines aggregations over Arrow arrays.

use multiversion::multiversion;
use std::ops::Add;

use crate::array::{
Expand Down Expand Up @@ -103,6 +104,8 @@ pub fn min_string<T: StringOffsetSizeTrait>(
}

/// Helper function to perform min/max lambda function on values from a numeric array.
#[multiversion]
#[clone(target = "x86_64+avx")]
fn min_max_helper<T, F>(array: &PrimitiveArray<T>, cmp: F) -> Option<T::Native>
where
T: ArrowNumericType,
Expand Down

0 comments on commit 3fbdd03

Please sign in to comment.