X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fvector_avx2.h;h=bd27db11ef9fa8b5ff5c6dfc607e36fdd07ed592;hb=refs%2Fchanges%2F34%2F16034%2F2;hp=04b312be9faa5cf67aed99c83c8c26aa2b44966d;hpb=4fce7f73e7585c070dde50e18f64ac91d9314f63;p=vpp.git diff --git a/src/vppinfra/vector_avx2.h b/src/vppinfra/vector_avx2.h index 04b312be9fa..bd27db11ef9 100644 --- a/src/vppinfra/vector_avx2.h +++ b/src/vppinfra/vector_avx2.h @@ -176,6 +176,18 @@ u16x16_mask_last (u16x16 v, u8 n_last) return v & masks[16 - n_last]; } +static_always_inline f32x8 +f32x8_from_u32x8 (u32x8 v) +{ + return (f32x8) _mm256_cvtepi32_ps ((__m256i) v); +} + +static_always_inline u32x8 +u32x8_from_f32x8 (f32x8 v) +{ + return (u32x8) _mm256_cvttps_epi32 ((__m256) v); +} + #endif /* included_vector_avx2_h */ /*