00001 /* 00002 Copyright (C) 2007 Remon Sijrier 00003 00004 Copyright (C) 2000-2007 Paul Davis 00005 00006 This file is part of Traverso 00007 00008 Traverso is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 00021 00022 */ 00023 00024 #ifndef __pbd_fpu_h__ 00025 #define __pbd_fpu_h__ 00026 00027 00028 class FPU { 00029 private: 00030 enum Flags { 00031 HasFlushToZero = 0x1, 00032 HasDenormalsAreZero = 0x2, 00033 HasSSE = 0x4, 00034 HasSSE2 = 0x8 00035 }; 00036 00037 public: 00038 FPU (); 00039 ~FPU (); 00040 00041 bool has_flush_to_zero () const { return _flags & HasFlushToZero; } 00042 bool has_denormals_are_zero () const { return _flags & HasDenormalsAreZero; } 00043 bool has_sse () const { return _flags & HasSSE; } 00044 bool has_sse2 () const { return _flags & HasSSE2; } 00045 00046 private: 00047 Flags _flags; 00048 }; 00049 00050 #endif /* __pbd_fpu_h__ */
1.5.5