DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jianbo Liu <jianbo.liu@linaro.org>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	 Jan Viktorin <viktorin@rehivetech.com>
Subject: Re: [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant
Date: Mon, 10 Jul 2017 11:34:10 +0800	[thread overview]
Message-ID: <CAP4Qi38t-kR=b1nM4qRYOtoq9VP1-iB80K0hgB0Pv+L-8zq0qA@mail.gmail.com> (raw)
In-Reply-To: <20170707162654.4638-1-jerin.jacob@caviumnetworks.com>

On 8 July 2017 at 00:26, Jerin Jacob <jerin.jacob@caviumnetworks.com> wrote:
> vaddvq_u16() is not available for armv7.
> Emulate the vaddvq_u16() using armv7 NEON intrinsics.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
>  lib/librte_eal/common/include/arch/arm/rte_vect.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
> index 0670ca2ee..69fd428f3 100644
> --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
> +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
> @@ -77,6 +77,17 @@ vqtbl1q_u8(uint8x16_t a, uint8x16_t b)
>
>         return vld1q_u8(rte_ret.u8);
>  }
> +
> +static inline uint16_t
> +vaddvq_u16(uint16x8_t a)
> +{
> +       uint32x4_t m = vpaddlq_u16(a);
> +       uint64x2_t n = vpaddlq_u32(m);
> +       uint64x1_t o = vget_low_u64(n) + vget_high_u64(n);
> +
> +       return vget_lane_u32((uint32x2_t)o, 0);
> +}
> +
>  #endif
>
>  #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
> --
> 2.13.2
>

Acked-by: Jianbo Liu <jianbo.liu@linaro.org>

  parent reply	other threads:[~2017-07-10  3:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 16:26 Jerin Jacob
2017-07-08 17:08 ` Thomas Monjalon
2017-07-10  3:51   ` Jianbo Liu
2017-07-10  7:28     ` Thomas Monjalon
2017-07-10  7:32       ` Thomas Monjalon
2017-07-10  3:34 ` Jianbo Liu [this message]
2017-07-10  7:35   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP4Qi38t-kR=b1nM4qRYOtoq9VP1-iB80K0hgB0Pv+L-8zq0qA@mail.gmail.com' \
    --to=jianbo.liu@linaro.org \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=thomas@monjalon.net \
    --cc=viktorin@rehivetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).