Skip to content

Commit

Permalink
refactor(rust): Add missing feature flag for prefetching on arm (#17740)
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp authored Jul 19, 2024
1 parent 690af34 commit 7015663
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions crates/polars-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#![cfg_attr(
all(target_arch = "aarch64", feature = "nightly"),
feature(stdarch_aarch64_prefetch)
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
pub mod abs_diff;
pub mod arena;
Expand Down
2 changes: 1 addition & 1 deletion crates/polars-utils/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub unsafe fn prefetch_l2(ptr: *const u8) {
unsafe { _mm_prefetch(ptr as *const _, _MM_HINT_T1) };
}

#[cfg(target_arch = "aarch64")]
#[cfg(all(target_arch = "aarch64", feature = "nightly"))]
{
use std::arch::aarch64::*;
unsafe { _prefetch(ptr as *const _, _PREFETCH_READ, _PREFETCH_LOCALITY2) };
Expand Down

0 comments on commit 7015663

Please sign in to comment.