diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2021-08-03 17:56:05 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-08-04 09:19:43 +0000 |
commit | 992d996ff5672ae647b21e27901d258aace79058 (patch) | |
tree | 847afe576eb65337f85fd8f5958a00c0646c1a72 /src/vppinfra/vector/array_mask.h | |
parent | 3edae3519858682cae65ce572480020f13f65079 (diff) |
vppinfra: fix the array mask function
Type: fix
Fixes: 0ec7dad7a00852663eb88554561347987f87bb53
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I7fab80b3c7e86ac712a34c24ea3e526b0b5bb7ad
Diffstat (limited to 'src/vppinfra/vector/array_mask.h')
-rw-r--r-- | src/vppinfra/vector/array_mask.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vppinfra/vector/array_mask.h b/src/vppinfra/vector/array_mask.h index 8f2e1d7d88c..778ed3e638f 100644 --- a/src/vppinfra/vector/array_mask.h +++ b/src/vppinfra/vector/array_mask.h @@ -37,11 +37,12 @@ clib_array_mask_u32 (u32 *src, u32 mask, u32 n_elts) for (i = 0; i + 8 <= n_elts; i += 8) *((u32x8u *) (src + i)) &= mask8; n_elts -= i; + src += i; #if defined(CLIB_HAVE_VEC256_MASK_LOAD_STORE) if (n_elts) { u8 m = pow2_mask (n_elts); - u32x8_mask_store (u32x8_mask_load_zero (src + i, m) & mask8, src + i, m); + u32x8_mask_store (u32x8_mask_load_zero (src, m) & mask8, src, m); } return; #endif @@ -51,6 +52,7 @@ clib_array_mask_u32 (u32 *src, u32 mask, u32 n_elts) for (i = 0; i + 4 <= n_elts; i += 4) *((u32x4u *) (src + i)) &= mask4; n_elts -= i; + src += i; switch (n_elts) { case 3: |