Preparation for #1.4.0 (#30)
- Fixed CPU affinity on Windows for NUMA and CPUs with lot of cores - Implemented per thread configurable Multihash mode (double, triple, quadruple, quintuple) - Rebased from XMRig 2.4.4
This commit is contained in:
parent
5f8ea98764
commit
acf27e9341
41 changed files with 2575 additions and 1104 deletions
|
@ -25,20 +25,17 @@
|
|||
#define __CRYPTONIGHT_H__
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include "align.h"
|
||||
|
||||
#include "Options.h"
|
||||
|
||||
#define MEMORY 2097152 /* 2 MiB */
|
||||
#define MEMORY_LITE 1048576 /* 1 MiB */
|
||||
|
||||
|
||||
struct cryptonight_ctx {
|
||||
VAR_ALIGN(16, uint8_t state0[200]);
|
||||
VAR_ALIGN(16, uint8_t state1[200]);
|
||||
VAR_ALIGN(16, uint8_t state[MAX_NUM_HASH_BLOCKS][208]); // 208 instead of 200 to maintain aligned to 16 byte boundaries
|
||||
VAR_ALIGN(16, uint8_t* memory);
|
||||
};
|
||||
|
||||
|
@ -46,16 +43,16 @@ struct cryptonight_ctx {
|
|||
class Job;
|
||||
class JobResult;
|
||||
|
||||
|
||||
class CryptoNight
|
||||
{
|
||||
public:
|
||||
static void hash(const uint8_t* input, size_t size, uint8_t* output, cryptonight_ctx* ctx);
|
||||
static bool init(int algo, int variant);
|
||||
static void hashDouble(const uint8_t* input, size_t size, uint8_t* output, cryptonight_ctx* ctx);
|
||||
static bool init(int algo, bool aesni);
|
||||
|
||||
static void hash(size_t factor, const uint8_t* input, size_t size, uint8_t* output, cryptonight_ctx* ctx);
|
||||
|
||||
private:
|
||||
static bool selfTest(int algo);
|
||||
};
|
||||
|
||||
|
||||
#endif /* __CRYPTONIGHT_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue