Merged v4.5.0-beta

This commit is contained in:
MoneroOcean 2019-11-02 12:09:14 -07:00
commit c208f8eb8f
79 changed files with 3704 additions and 161 deletions

View file

@ -49,7 +49,7 @@ public:
constexpr inline bool isR() const { return ALGO == Algorithm::CN_R; }
constexpr inline size_t memory() const { static_assert(ALGO > Algorithm::INVALID && ALGO < Algorithm::RX_0, "invalid CRYPTONIGHT algorithm"); return CN_MEMORY; }
constexpr inline uint32_t iterations() const { static_assert(ALGO > Algorithm::INVALID && ALGO < Algorithm::RX_0, "invalid CRYPTONIGHT algorithm"); return CN_ITER; }
constexpr inline uint32_t mask() const { return ((memory() - 1) / 16) * 16; }
constexpr inline uint32_t mask() const { return static_cast<uint32_t>(((memory() - 1) / 16) * 16); }
inline static size_t memory(Algorithm::Id algo)
{

View file

@ -48,8 +48,8 @@ xmrig::Nonce::Nonce()
{
m_paused = true;
for (int i = 0; i < MAX; ++i) {
m_sequence[i] = 1;
for (auto &i : m_sequence) {
i = 1;
}
}
@ -85,15 +85,15 @@ void xmrig::Nonce::stop()
{
pause(false);
for (int i = 0; i < MAX; ++i) {
m_sequence[i] = 0;
for (auto &i : m_sequence) {
i = 0;
}
}
void xmrig::Nonce::touch()
{
for (int i = 0; i < MAX; ++i) {
m_sequence[i]++;
for (auto &i : m_sequence) {
i++;
}
}

View file

@ -35,7 +35,7 @@ namespace xmrig {
class Nonce
{
public:
enum Backend {
enum Backend : uint32_t {
CPU,
OPENCL,
CUDA,