-
Notifications
You must be signed in to change notification settings - Fork 26
/
Nonce.h
33 lines (26 loc) · 957 Bytes
/
Nonce.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <windows.h>
#include <vector>
#include <array>
#include <thread>
#include <string>
#include <intrin.h>
#define HASH_SIZE 32
#define HASH_CAP 4096
#define SCOOP_SIZE 64
#define PLOT_SIZE (HASH_CAP * SCOOP_SIZE) // 4096*64
extern std::array <char*, HASH_CAP * sizeof(char*)> cache;
extern std::vector<size_t> worker_status;
bool write_to_stream(const unsigned long long data);
namespace AVX2
{
void work_i(const size_t local_num, const unsigned long long loc_addr, const unsigned long long local_startnonce, const unsigned long long local_nonces);
}
namespace AVX1
{
void work_i(const size_t local_num, const unsigned long long loc_addr, const unsigned long long local_startnonce, const unsigned long long local_nonces);
}
namespace SSE4
{
void work_i(const size_t local_num, const unsigned long long loc_addr, const unsigned long long local_startnonce, const unsigned long long local_nonces);
}