All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH SBC 1/3] sbc: Add initial code for SSE primitives
Date: Wed, 12 Aug 2020 14:48:42 +0200	[thread overview]
Message-ID: <93FEE5B2-F495-40C4-9386-E44DF132C49D@holtmann.org> (raw)
In-Reply-To: <20200811181623.3683374-1-luiz.dentz@gmail.com>

Hi Luiz,

> 
> ---
> Makefile.am              |   1 +
> sbc/sbc_primitives.c     |  20 ++-
> sbc/sbc_primitives_sse.c | 361 +++++++++++++++++++++++++++++++++++++++
> sbc/sbc_primitives_sse.h |  38 +++++
> 4 files changed, 417 insertions(+), 3 deletions(-)
> create mode 100644 sbc/sbc_primitives_sse.c
> create mode 100644 sbc/sbc_primitives_sse.h
> 
> diff --git a/Makefile.am b/Makefile.am
> index 342043d..7ff0c7d 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -14,6 +14,7 @@ sbc_headers = sbc/sbc.h
> 
> sbc_sources = sbc/sbc.c sbc/sbc_private.h sbc/sbc_math.h sbc/sbc_tables.h \
> 		sbc/sbc_primitives.h sbc/sbc_primitives.c \
> +		sbc/sbc_primitives_sse.h sbc/sbc_primitives_sse.c \
> 		sbc/sbc_primitives_mmx.h sbc/sbc_primitives_mmx.c \
> 		sbc/sbc_primitives_iwmmxt.h sbc/sbc_primitives_iwmmxt.c \
> 		sbc/sbc_primitives_neon.h sbc/sbc_primitives_neon.c \
> diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c
> index ff343cf..97a75be 100644
> --- a/sbc/sbc_primitives.c
> +++ b/sbc/sbc_primitives.c
> @@ -33,6 +33,7 @@
> #include "sbc_tables.h"
> 
> #include "sbc_primitives.h"
> +#include "sbc_primitives_sse.h"
> #include "sbc_primitives_mmx.h"
> #include "sbc_primitives_iwmmxt.h"
> #include "sbc_primitives_neon.h"
> @@ -590,6 +591,21 @@ static int sbc_calc_scalefactors_j(
> 	return joint;
> }
> 
> +static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
> +{
> +	__builtin_cpu_init();
> +
> +#ifdef SBC_BUILD_WITH_MMX_SUPPORT
> +	if (__builtin_cpu_supports("mmx"))
> +		sbc_init_primitives_mmx(state);
> +#endif
> +
> +#ifdef SBC_BUILD_WITH_SSE_SUPPORT
> +	if (__builtin_cpu_supports("sse4.2"))
> +		sbc_init_primitives_sse(state);
> +#endif

lets keep the ifdef in the primitive functions they belong. This should be consistent across all primitives and not spread in two places.

Regards

Marcel


  parent reply	other threads:[~2020-08-12 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11 18:16 [PATCH SBC 1/3] sbc: Add initial code for SSE primitives Luiz Augusto von Dentz
2020-08-11 18:16 ` [PATCH SBC 2/3] sbc/sbc_primitives_sse: Optimize sbc_analyze_4s Luiz Augusto von Dentz
2020-08-11 18:16 ` [PATCH SBC 3/3] sbc/sbc_primitives_sse: Optimize sbc_analyze_8s Luiz Augusto von Dentz
2020-08-12 12:48 ` Marcel Holtmann [this message]
2020-08-14 20:56   ` [PATCH SBC 1/3] sbc: Add initial code for SSE primitives Luiz Augusto von Dentz

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=93FEE5B2-F495-40C4-9386-E44DF132C49D@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.