Conversion to NinjaRig.
This commit is contained in:
parent
84f56f0a4e
commit
2845347881
280 changed files with 18971 additions and 32469 deletions
41
src/crypto/argon2_hasher/hash/cpu/CpuHasher.h
Normal file
41
src/crypto/argon2_hasher/hash/cpu/CpuHasher.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// Created by Haifa Bogdan Adnan on 03/08/2018.
|
||||
//
|
||||
|
||||
#ifndef ARGON2_CPU_HASHER_H
|
||||
#define ARGON2_CPU_HASHER_H
|
||||
|
||||
struct CpuHasherThread {
|
||||
Argon2 *argon2;
|
||||
HashData hashData;
|
||||
void *mem;
|
||||
};
|
||||
|
||||
class CpuHasher : public Hasher {
|
||||
public:
|
||||
CpuHasher();
|
||||
~CpuHasher();
|
||||
|
||||
virtual bool initialize(xmrig::Algo algorithm, xmrig::Variant variant);
|
||||
virtual bool configure(xmrig::HasherConfig &config);
|
||||
virtual void cleanup();
|
||||
virtual int compute(int threadIdx, uint8_t *input, size_t size, uint8_t *output);
|
||||
virtual size_t parallelism(int workerIdx);
|
||||
virtual size_t deviceCount();
|
||||
|
||||
private:
|
||||
string detectFeaturesAndMakeDescription();
|
||||
void loadArgon2BlockFiller();
|
||||
void *allocateMemory(void *&buffer);
|
||||
|
||||
DeviceInfo m_deviceInfo;
|
||||
string m_optimization;
|
||||
int m_availableProcessingThr;
|
||||
int m_availableMemoryThr;
|
||||
void *m_dllHandle;
|
||||
Argon2Profile *m_profile;
|
||||
argon2BlocksFillerPtr m_argon2BlocksFillerPtr;
|
||||
CpuHasherThread *m_threadData;
|
||||
};
|
||||
|
||||
#endif //ARGON2_CPU_HASHER_H
|
Loading…
Add table
Add a link
Reference in a new issue