1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-12 15:57:59 +00:00

x12: reorder cpu code to notice its not x11 one

This commit is contained in:
Tanguy Pruvot 2018-03-26 06:48:21 +02:00
parent 51c02a7e9a
commit 0961544c85

View File

@ -1,19 +1,18 @@
/* /*
* X12 algorithm * X12 algorithm
*/ */
extern "C" extern "C" {
{
#include "sph/sph_blake.h" #include "sph/sph_blake.h"
#include "sph/sph_bmw.h" #include "sph/sph_bmw.h"
#include "sph/sph_groestl.h"
#include "sph/sph_skein.h"
#include "sph/sph_jh.h"
#include "sph/sph_keccak.h"
#include "sph/sph_luffa.h" #include "sph/sph_luffa.h"
#include "sph/sph_cubehash.h" #include "sph/sph_cubehash.h"
#include "sph/sph_shavite.h" #include "sph/sph_shavite.h"
#include "sph/sph_simd.h" #include "sph/sph_simd.h"
#include "sph/sph_echo.h" #include "sph/sph_echo.h"
#include "sph/sph_groestl.h"
#include "sph/sph_skein.h"
#include "sph/sph_jh.h"
#include "sph/sph_keccak.h"
#include "sph/sph_hamsi.h" #include "sph/sph_hamsi.h"
} }
#include "miner.h" #include "miner.h"
@ -29,19 +28,17 @@ extern void x13_hamsi512_cpu_hash_64(int thr_id, uint32_t threads, uint32_t star
// X12 CPU Hash // X12 CPU Hash
extern "C" void x12hash(void *output, const void *input) extern "C" void x12hash(void *output, const void *input)
{ {
// blake1-bmw2-grs3-skein4-jh5-keccak6-luffa7-cubehash8-shavite9-simd10-echo11-hamsi12
sph_blake512_context ctx_blake; sph_blake512_context ctx_blake;
sph_bmw512_context ctx_bmw; sph_bmw512_context ctx_bmw;
sph_groestl512_context ctx_groestl;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_skein512_context ctx_skein;
sph_luffa512_context ctx_luffa; sph_luffa512_context ctx_luffa;
sph_cubehash512_context ctx_cubehash; sph_cubehash512_context ctx_cubehash;
sph_shavite512_context ctx_shavite; sph_shavite512_context ctx_shavite;
sph_simd512_context ctx_simd; sph_simd512_context ctx_simd;
sph_echo512_context ctx_echo; sph_echo512_context ctx_echo;
sph_groestl512_context ctx_groestl;
sph_skein512_context ctx_skein;
sph_jh512_context ctx_jh;
sph_keccak512_context ctx_keccak;
sph_hamsi512_context ctx_hamsi; sph_hamsi512_context ctx_hamsi;
uint32_t hash[32]; uint32_t hash[32];
@ -105,7 +102,7 @@ extern "C" int scanhash_x12(int thr_id, struct work* work, uint32_t max_nonce, u
uint32_t *pdata = work->data; uint32_t *pdata = work->data;
uint32_t *ptarget = work->target; uint32_t *ptarget = work->target;
const uint32_t first_nonce = pdata[19]; const uint32_t first_nonce = pdata[19];
int intensity = 19; // (device_sm[device_map[thr_id]] > 500 && !is_windows()) ? 20 : 19; int intensity = (device_sm[device_map[thr_id]] > 500 && !is_windows()) ? 20 : 19;
uint32_t throughput = cuda_default_throughput(thr_id, 1 << intensity); // 19=256*256*8; uint32_t throughput = cuda_default_throughput(thr_id, 1 << intensity); // 19=256*256*8;
//if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce); //if (init[thr_id]) throughput = min(throughput, max_nonce - first_nonce);