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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <uv.h>
|
#include <uv.h>
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ static inline rapidjson::Value normalize(double d)
|
||||||
{
|
{
|
||||||
using namespace rapidjson;
|
using namespace rapidjson;
|
||||||
|
|
||||||
if (!isnormal(d)) {
|
if (!std::isnormal(d)) {
|
||||||
return Value(kNullType);
|
return Value(kNullType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <libcpuid.h>
|
#include <libcpuid.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
|
@ -124,8 +124,8 @@ static inline bool has_ossave()
|
||||||
|
|
||||||
xmrig::BasicCpuInfo::BasicCpuInfo() :
|
xmrig::BasicCpuInfo::BasicCpuInfo() :
|
||||||
m_assembly(Assembly::NONE),
|
m_assembly(Assembly::NONE),
|
||||||
m_brand(),
|
|
||||||
m_aes(has_aes_ni()),
|
m_aes(has_aes_ni()),
|
||||||
|
m_brand(),
|
||||||
m_avx2(has_avx2() && has_ossave()),
|
m_avx2(has_avx2() && has_ossave()),
|
||||||
m_threads(std::thread::hardware_concurrency())
|
m_threads(std::thread::hardware_concurrency())
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,8 +55,8 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Assembly m_assembly;
|
Assembly m_assembly;
|
||||||
|
bool m_aes;
|
||||||
char m_brand[64 + 6];
|
char m_brand[64 + 6];
|
||||||
const bool m_aes;
|
|
||||||
const bool m_avx2;
|
const bool m_avx2;
|
||||||
const size_t m_threads;
|
const size_t m_threads;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,8 +37,8 @@
|
||||||
|
|
||||||
xmrig::BasicCpuInfo::BasicCpuInfo() :
|
xmrig::BasicCpuInfo::BasicCpuInfo() :
|
||||||
m_aes(false),
|
m_aes(false),
|
||||||
m_avx2(false),
|
|
||||||
m_brand(),
|
m_brand(),
|
||||||
|
m_avx2(false),
|
||||||
m_threads(std::thread::hardware_concurrency())
|
m_threads(std::thread::hardware_concurrency())
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_ARMv8
|
# ifdef XMRIG_ARMv8
|
||||||
|
@ -61,3 +61,9 @@ size_t xmrig::BasicCpuInfo::optimalThreadsCount(size_t memSize, int maxCpuUsage)
|
||||||
{
|
{
|
||||||
return threads();
|
return threads();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm) const
|
||||||
|
{
|
||||||
|
return CpuThreads(threads());
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue