diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-06-01 20:29:36 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-06-01 20:29:36 +0000 |
commit | 01a780eb4d533465e94825b65a3f3d4216900832 (patch) | |
tree | 777e4cbf1c827d8fa29e676f33b06736e76ef2fb /libs/pbd/pbd/fpu.h | |
parent | 38ed75ff979e72e73a759c350cd8b1e64e2ed18c (diff) |
round 2 of denormal handling changes - detect DAZ support at runtime, and use accordingly. move all FPU feature detection into PBD::FPU
git-svn-id: svn://localhost/ardour2/trunk@1939 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/fpu.h')
-rw-r--r-- | libs/pbd/pbd/fpu.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libs/pbd/pbd/fpu.h b/libs/pbd/pbd/fpu.h new file mode 100644 index 0000000000..617dcdf3da --- /dev/null +++ b/libs/pbd/pbd/fpu.h @@ -0,0 +1,31 @@ +#ifndef __pbd_fpu_h__ +#define __pbd_fpu_h__ + +namespace PBD { + + +class FPU { + private: + enum Flags { + HasFlushToZero = 0x1, + HasDenormalsAreZero = 0x2, + HasSSE = 0x4, + HasSSE2 = 0x8 + }; + + public: + FPU (); + ~FPU (); + + bool has_flush_to_zero () const { return _flags & HasFlushToZero; } + bool has_denormals_are_zero () const { return _flags & HasDenormalsAreZero; } + bool has_sse () const { return _flags & HasSSE; } + bool has_sse2 () const { return _flags & HasSSE2; } + + private: + Flags _flags; +}; + +} + +#endif /* __pbd_fpu_h__ */ |