Accommodate newly introduced source(s) in our MSVC project (libpbd)
[ardour.git] / libs / pbd / pbd / fpu.h
index 6627951e9f32514b27972ec87743db276b69b848..045b63381255d906063c8c9705633382280e7ade 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Paul Davis 
+    Copyright (C) 2012 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -30,20 +30,28 @@ class LIBPBD_API FPU {
                HasFlushToZero = 0x1,
                HasDenormalsAreZero = 0x2,
                HasSSE = 0x4,
-               HasSSE2 = 0x8
+               HasSSE2 = 0x8,
+               HasAVX = 0x10
        };
 
   public:
-       FPU ();
        ~FPU ();
 
+       static FPU* instance();
+       static void destroy();
+
        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; }
-       
+       bool has_avx () const { return _flags & HasAVX; }
+
   private:
        Flags _flags;
+
+       static FPU* _instance;
+
+       FPU ();
 };
 
 }