mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-11 05:14:40 +00:00
Fixed build.
This commit is contained in:
parent
f42adafee0
commit
3bebf778da
5 changed files with 12 additions and 5 deletions
|
@ -22,7 +22,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <string.h>
|
||||
#include <uv.h>
|
||||
|
||||
|
@ -44,7 +44,7 @@ static inline rapidjson::Value normalize(double d)
|
|||
{
|
||||
using namespace rapidjson;
|
||||
|
||||
if (!isnormal(d)) {
|
||||
if (!std::isnormal(d)) {
|
||||
return Value(kNullType);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <libcpuid.h>
|
||||
#include <math.h>
|
||||
|
|
|
@ -124,8 +124,8 @@ static inline bool has_ossave()
|
|||
|
||||
xmrig::BasicCpuInfo::BasicCpuInfo() :
|
||||
m_assembly(Assembly::NONE),
|
||||
m_brand(),
|
||||
m_aes(has_aes_ni()),
|
||||
m_brand(),
|
||||
m_avx2(has_avx2() && has_ossave()),
|
||||
m_threads(std::thread::hardware_concurrency())
|
||||
{
|
||||
|
|
|
@ -55,8 +55,8 @@ protected:
|
|||
|
||||
private:
|
||||
Assembly m_assembly;
|
||||
bool m_aes;
|
||||
char m_brand[64 + 6];
|
||||
const bool m_aes;
|
||||
const bool m_avx2;
|
||||
const size_t m_threads;
|
||||
};
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
|
||||
xmrig::BasicCpuInfo::BasicCpuInfo() :
|
||||
m_aes(false),
|
||||
m_avx2(false),
|
||||
m_brand(),
|
||||
m_avx2(false),
|
||||
m_threads(std::thread::hardware_concurrency())
|
||||
{
|
||||
# ifdef XMRIG_ARMv8
|
||||
|
@ -61,3 +61,9 @@ size_t xmrig::BasicCpuInfo::optimalThreadsCount(size_t memSize, int maxCpuUsage)
|
|||
{
|
||||
return threads();
|
||||
}
|
||||
|
||||
|
||||
xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm) const
|
||||
{
|
||||
return CpuThreads(threads());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue