Skip to content

Commit

Permalink
checking atomic aliment reverted in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
beling committed Oct 2, 2024
1 parent 8fb46c4 commit e3d9535
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ph/src/fmph/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ pub(crate) fn concat_level_arrays(levels: Vec<LevelArray>) -> Box<[u64]> {
/// Cast `v` to slice of `AtomicU64`.
#[inline]
pub(crate) fn from_mut_slice(v: &mut LevelArray) -> &mut [AtomicU64] {
#[cfg(not(feature = "aligned-vec"))] let [] = [(); core::mem::align_of::<AtomicU64>() - core::mem::align_of::<u64>()];
#[cfg(not(all(feature = "aligned-vec", target_pointer_width = "32")))]
let [] = [(); core::mem::align_of::<AtomicU64>() - core::mem::align_of::<u64>()];
unsafe { &mut *(v.as_mut() as *mut [u64] as *mut [AtomicU64]) }
} // copied from unstable rust, from_mut_slice, commit #94816, issue #76314

Expand Down

0 comments on commit e3d9535

Please sign in to comment.