/*
- 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
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 ();
};
}