detection of SSE3 support in configure.ac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/12/6 Nallasellan, Singaravelan <singaravelan.nallasellan at intel.com>:
>> I have an optimized SSE-based resampling library that I bolted in PulseAudio. It was
>> measured to bring a 2x speed-up over speex, mainly because it uses fixed-tables
>> instead of interpolations, the price being that it can only be used for fixed-rate
>> sinks/sources.
>> Since it's hardware-specific, I'd need a means to enable/disable it at compile time,
>> using some kind of voodoo magic in configure.ac. Does anyone have pointers on SSE
>> detection logic? To make things safe, I also detect SSE at run time but would like to
>> disable it completely for other non-x86 or older platforms.
>
> CPUID processor instruction should provide all the details about the processor.

Which is of course x86 specific and is already used for runtime
detection of features in src/pulsecore/cpu-x86.c.

For compile-time detection you can't use it, because of cross-compiling.
I'd just add a "case $host in" check and define a symbol like HAVE_ARM
and HAVE_X86 (if they aren't already defined somewhere) in
configure.ac, just like some ARM features are detected this way.

Maarten


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux