Is there a processor-independent vec_xor?

brianleahy

Colonel Panic
vec_xor is the Altivec (G4 & G5) command to do an XOR on a 128bit wide vector.

There is also an intel-specific instruction _mm_xor --- something.

The vecLib is supposed to offer processor-universal instructions - and come on, XOR is about the simplest thing you can ask a computer to do. Yet, there seem to be no raw-bitwise operations in there - plenty of image processing, signal processing, and so forth, but no plain old boolean logic.

Anyone know if I've missed something?
 
I think you're right there's no processor-independent 128 bit XOR in the Accelerate framework.

I guess it's done this way because it's considered a low-level function (directly linked to processor instructions), and it's different from processor to processor which such instructions are available. Thus, most applications and libraries that use those functions need processor-specific code anyway.
 
Back
Top