Displaying 1 result from an estimated 1 matches for "vectorunitdetected".
2003 Oct 12
1
Altivec-enabled libvorbis...
...cOSX looks
like this:
#include <CoreServices/CoreServices.h>
long cpufeature = 0;
OSErr err = Gestalt(gestaltPowerPCProcessorFeatures, &cpufeature);
if (err == noErr) {
if ((1 << gestaltPowerPCHasVectorInstructions) & cpufeature)
VectorUnitDetected = 1;
}
Using this code will need "-framework Carbon" on the gcc and ld
commandline.
Non-Mac platforms should already have _al_has_vector_unit() #defined to
be (0), and the *_vectorized functions are inlined stubs, so branches
and functions should be optimized out...but ideall...