[vlc-devel] [PATCH 04/25] cpu: add CPU feature masking
Victorien Le Couviour
victorien.lecouviour.tuffet at gmail.com
Tue Apr 14 17:42:56 CEST 2020
Hi,
Doesn't that imply I'd have to write a version per feature I want to test?
Like NO_OPTI for C, SSE2_OPTI, SSSE3 OPTI, SSE4_OPTI (if we happen to have
dedicated code for this at some point), AVX2_OPTI, AVX512_OPTI (in the
future).
I mean it can be done, in a .h file that we include everywhere we want to
test, or just in vlc_common.h or smth.
But what is wrong with extending the API?
I get that it's not gonna be used outside of tool purposes, that would be
odd, but it does hurt right? Does it?
On Tue, Apr 14, 2020 at 4:34 PM Thomas Guillem <thomas at gllm.fr> wrote:
> FYI, this is what I did in copy.c to test with optims disabled:
>
> #ifdef COPY_TEST_NOOPTIM
> # undef vlc_CPU_SSE4_1
> # define vlc_CPU_SSE4_1() (0)
> # undef vlc_CPU_SSE3
> # define vlc_CPU_SSE3() (0)
> # undef vlc_CPU_SSSE3
> # define vlc_CPU_SSSE3() (0)
> # undef vlc_CPU_SSE2
> # define vlc_CPU_SSE2() (0)
> #endif
>
> On Tue, Apr 14, 2020, at 16:01, Rémi Denis-Courmont wrote:
> > Le tiistaina 14. huhtikuuta 2020, 13.40.15 EEST Victorien Le
> Couviour--Tuffet a
> > écrit :
> > > This is allows to temporarily mask a CPU feature.
> > > It can for example be useful for testing a function with several
> > > underlying SIMD implementations.
> > >
> > > It adds vlc_CPU_mask and vlc_CPU_unmask to the core API.
> >
> > This is neither thread-safe nor compatible with the pure/constant
> attributes,
> > which really should be set on vlc_CPU() (In fact, I thought they already
> were,
> > though it seems they are not).
> >
> > --
> > Rémi Denis-Courmont
> > Tapiolan uusi kaupunki, Uudenmaan tasavalta
> >
> >
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200414/42c80b06/attachment.html>
More information about the vlc-devel
mailing list