mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 20:19:23 +00:00
Fix code style
This commit is contained in:
parent
abb3340cc7
commit
680e4dd865
4 changed files with 8 additions and 8 deletions
|
@ -93,7 +93,7 @@ template<size_t N>
|
||||||
xmrig::CpuWorker<N>::~CpuWorker()
|
xmrig::CpuWorker<N>::~CpuWorker()
|
||||||
{
|
{
|
||||||
# ifdef XMRIG_ALGO_RANDOMX
|
# ifdef XMRIG_ALGO_RANDOMX
|
||||||
RxVm::Destroy(m_vm);
|
RxVm::destroy(m_vm);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
CnCtx::release(m_ctx, N);
|
CnCtx::release(m_ctx, N);
|
||||||
|
@ -118,7 +118,7 @@ void xmrig::CpuWorker<N>::allocateRandomX_VM()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_vm) {
|
if (!m_vm) {
|
||||||
m_vm = RxVm::Create(dataset, m_memory->scratchpad(), !m_hwAES, m_assembly, m_node);
|
m_vm = RxVm::create(dataset, m_memory->scratchpad(), !m_hwAES, m_assembly, m_node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "crypto/rx/RxVm.h"
|
#include "crypto/rx/RxVm.h"
|
||||||
|
|
||||||
|
|
||||||
randomx_vm* xmrig::RxVm::Create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, xmrig::Assembly assembly, uint32_t node)
|
randomx_vm* xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, xmrig::Assembly assembly, uint32_t node)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ randomx_vm* xmrig::RxVm::Create(RxDataset *dataset, uint8_t *scratchpad, bool so
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void xmrig::RxVm::Destroy(randomx_vm* vm)
|
void xmrig::RxVm::destroy(randomx_vm* vm)
|
||||||
{
|
{
|
||||||
if (vm) {
|
if (vm) {
|
||||||
randomx_destroy_vm(vm);
|
randomx_destroy_vm(vm);
|
||||||
|
|
|
@ -50,8 +50,8 @@ class RxVm
|
||||||
public:
|
public:
|
||||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(RxVm);
|
XMRIG_DISABLE_COPY_MOVE_DEFAULT(RxVm);
|
||||||
|
|
||||||
static randomx_vm* Create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, xmrig::Assembly assembly, uint32_t node);
|
static randomx_vm* create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, xmrig::Assembly assembly, uint32_t node);
|
||||||
static void Destroy(randomx_vm* vm);
|
static void destroy(randomx_vm* vm);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ static void getResults(JobBundle &bundle, std::vector<JobResult> &results, uint3
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto vm = RxVm::Create(dataset, memory->scratchpad(), !hwAES, Assembly::NONE, 0);
|
auto vm = RxVm::create(dataset, memory->scratchpad(), !hwAES, Assembly::NONE, 0);
|
||||||
|
|
||||||
for (uint32_t nonce : bundle.nonces) {
|
for (uint32_t nonce : bundle.nonces) {
|
||||||
*bundle.job.nonce() = nonce;
|
*bundle.job.nonce() = nonce;
|
||||||
|
@ -126,7 +126,7 @@ static void getResults(JobBundle &bundle, std::vector<JobResult> &results, uint3
|
||||||
checkHash(bundle, results, nonce, hash, errors);
|
checkHash(bundle, results, nonce, hash, errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
RxVm::Destroy(vm);
|
RxVm::destroy(vm);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
else if (algorithm.family() == Algorithm::ARGON2) {
|
else if (algorithm.family() == Algorithm::ARGON2) {
|
||||||
|
|
Loading…
Reference in a new issue