Monero
Loading...
Searching...
No Matches
external
randomx
src
cpu.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2019, tevador <tevador@gmail.com>
3
4
All rights reserved.
5
6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions are met:
8
* Redistributions of source code must retain the above copyright
9
notice, this list of conditions and the following disclaimer.
10
* Redistributions in binary form must reproduce the above copyright
11
notice, this list of conditions and the following disclaimer in the
12
documentation and/or other materials provided with the distribution.
13
* Neither the name of the copyright holder nor the
14
names of its contributors may be used to endorse or promote products
15
derived from this software without specific prior written permission.
16
17
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#pragma once
30
31
namespace
randomx
{
32
33
class
Cpu
{
34
public
:
35
Cpu
();
36
bool
hasAes
()
const
{
37
return
aes_
;
38
}
39
bool
hasSsse3
()
const
{
40
return
ssse3_
;
41
}
42
bool
hasAvx2
()
const
{
43
return
avx2_
;
44
}
45
private
:
46
bool
aes_
,
ssse3_
,
avx2_
;
47
};
48
49
}
randomx::Cpu::aes_
bool aes_
Definition
cpu.hpp:46
randomx::Cpu::hasSsse3
bool hasSsse3() const
Definition
cpu.hpp:39
randomx::Cpu::hasAvx2
bool hasAvx2() const
Definition
cpu.hpp:42
randomx::Cpu::Cpu
Cpu()
Definition
cpu.cpp:51
randomx::Cpu::ssse3_
bool ssse3_
Definition
cpu.hpp:46
randomx::Cpu::avx2_
bool avx2_
Definition
cpu.hpp:46
randomx::Cpu::hasAes
bool hasAes() const
Definition
cpu.hpp:36
randomx
Definition
allocator.cpp:35
Generated on
for Monero by
1.16.1