41 #ifndef __CAVectorUnit_h__
42 #define __CAVectorUnit_h__
44 #include <TargetConditionals.h>
45 #include "CAVectorUnitTypes.h"
49 #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__)
50 #include <CoreFoundation/CFBase.h>
58 extern int gCAVectorUnitType;
64 extern SInt32 CAVectorUnit_Examine();
66 static inline SInt32 CAVectorUnit_GetType()
68 int x = gCAVectorUnitType;
69 return (x != kVecUninitialized) ? x : CAVectorUnit_Examine();
72 static inline Boolean CAVectorUnit_HasVectorUnit()
74 return CAVectorUnit_GetType() > kVecNone;
85 static SInt32 GetVectorUnitType() {
return CAVectorUnit_GetType(); }
86 static bool HasVectorUnit() {
return GetVectorUnitType() > kVecNone; }
87 static bool HasAltivec() {
return GetVectorUnitType() == kVecAltivec; }
88 static bool HasSSE2() {
return GetVectorUnitType() >= kVecSSE2; }
89 static bool HasSSE3() {
return GetVectorUnitType() == kVecSSE3; }
93 #endif // __CAVectorUnit_h__