Skip to content

Commit

Permalink
Add implementations for NEON.
Browse files Browse the repository at this point in the history
  • Loading branch information
kouchy committed Jan 31, 2022
1 parent d96caa2 commit 3d39b41
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/mipp_impl_NEON.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,39 @@
return (reg_2) vget_high_f32((float32x4_t) v);
}

// ------------------------------------------------------------------------------------------------------- getfirst
#ifdef __aarch64__
template <>
inline double getfirst<double>(const mipp::reg r){
return vdupd_lane_f64((float64x1_t)mipp::low<double>(r), 0);
}

template <>
inline float getfirst<float>(const mipp::reg r){
return vdups_lane_f32((float32x2_t)mipp::low<float>(r), 0);
}

template <>
inline int64_t getfirst<int64_t>(const mipp::reg r){
return vdupd_laneq_s64((int64x2_t)r, 0);
}

template <>
inline int32_t getfirst<int32_t>(const mipp::reg r){
return vdups_laneq_s32((int32x4_t)r, 0);
}

template <>
inline int16_t getfirst<int16_t>(const mipp::reg r){
return vduph_laneq_s16((int16x8_t)r, 0);
}

template <>
inline int8_t getfirst<int8_t>(const mipp::reg r){
return vdupb_laneq_s8((int8x16_t)r, 0);
}
#endif

// -------------------------------------------------------------------------------------------------------- combine
#ifdef __aarch64__
template <>
Expand Down

0 comments on commit 3d39b41

Please sign in to comment.