Ardour
9.0-pre0-350-gf17a656217
fpu.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007-2015 Paul Davis <paul@linuxaudiosystems.com>
3
* Copyright (C) 2015 Robin Gareus <robin@gareus.org>
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
#pragma once
21
22
#include "
pbd/libpbd_visibility.h
"
23
24
namespace
PBD
{
25
26
class
LIBPBD_API
FPU
{
27
private
:
28
enum
Flags
{
29
HasFlushToZero = 0x1,
30
HasDenormalsAreZero = 0x2,
31
HasSSE = 0x4,
32
HasSSE2 = 0x8,
33
HasAVX = 0x10,
34
HasNEON = 0x20,
35
HasFMA = 0x40,
36
HasAVX512F = 0x80,
37
};
38
39
public
:
40
~FPU
();
41
42
static
FPU
*
instance
();
43
static
void
destroy
();
44
45
bool
has_flush_to_zero
()
const
{
return
_flags & HasFlushToZero; }
46
bool
has_denormals_are_zero
()
const
{
return
_flags & HasDenormalsAreZero; }
47
bool
has_sse
()
const
{
return
_flags & HasSSE; }
48
bool
has_sse2
()
const
{
return
_flags & HasSSE2; }
49
bool
has_avx
()
const
{
return
_flags & HasAVX; }
50
bool
has_avx512f
()
const
{
return
_flags & HasAVX512F; }
51
bool
has_fma
()
const
{
return
_flags & HasFMA; }
52
bool
has_neon
()
const
{
return
_flags & HasNEON; }
53
54
private
:
55
Flags
_flags
;
56
57
static
FPU
*
_instance
;
58
59
FPU
();
60
};
61
62
}
63
PBD::FPU
Definition:
fpu.h:26
PBD::FPU::FPU
FPU()
PBD::FPU::_flags
Flags _flags
Definition:
fpu.h:55
PBD::FPU::destroy
static void destroy()
PBD::FPU::has_sse
bool has_sse() const
Definition:
fpu.h:47
PBD::FPU::has_avx
bool has_avx() const
Definition:
fpu.h:49
PBD::FPU::instance
static FPU * instance()
PBD::FPU::has_fma
bool has_fma() const
Definition:
fpu.h:51
PBD::FPU::has_avx512f
bool has_avx512f() const
Definition:
fpu.h:50
PBD::FPU::~FPU
~FPU()
PBD::FPU::has_sse2
bool has_sse2() const
Definition:
fpu.h:48
PBD::FPU::has_denormals_are_zero
bool has_denormals_are_zero() const
Definition:
fpu.h:46
PBD::FPU::Flags
Flags
Definition:
fpu.h:28
PBD::FPU::has_flush_to_zero
bool has_flush_to_zero() const
Definition:
fpu.h:45
PBD::FPU::has_neon
bool has_neon() const
Definition:
fpu.h:52
PBD::FPU::_instance
static FPU * _instance
Definition:
fpu.h:57
libpbd_visibility.h
LIBPBD_API
#define LIBPBD_API
Definition:
libpbd_visibility.h:50
PBD
Definition:
axis_view.h:42
libs
pbd
pbd
fpu.h
Generated on Tue Nov 5 2024 05:28:34 for Ardour by
1.9.1