From e36ff05210e61c2df2db32f13057b51a4c2ec642 Mon Sep 17 00:00:00 2001 From: John Tromp Date: Sat, 9 Jun 2018 14:14:52 +0200 Subject: [PATCH] more cuda 192,7 support --- blake2b.cu | 2 +- equi_miner.cu | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/blake2b.cu b/blake2b.cu index c1b7922..d715637 100644 --- a/blake2b.cu +++ b/blake2b.cu @@ -98,7 +98,7 @@ static void G(const int r, const int i, u64 &a, u64 &b, u64 &c, u64 &d, u64 cons G(r, 7, v[3], v[4], v[ 9], v[14], m); __device__ void blake2b_gpu_hash(blake2b_state *state, u32 idx, uchar *hash, u32 outlen) { - const u32 leb = htole32(idx); + const u32 leb = idx; // CUDA is little endian, so no need for htole32(idx) memcpy(state->buf + state->buflen, &leb, sizeof(u32)); state->buflen += sizeof(u32); state->counter += state->buflen; diff --git a/equi_miner.cu b/equi_miner.cu index c92c5ed..4163f94 100644 --- a/equi_miner.cu +++ b/equi_miner.cu @@ -10,6 +10,8 @@ typedef uint16_t u16; typedef uint64_t u64; +#define htole32(x) (x) + #define checkCudaErrors(ans) { gpuAssert((ans), __FILE__, __LINE__); } inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) { if (code != cudaSuccess) { @@ -290,6 +292,8 @@ struct equi { if (soli < MAXSOLS) #if WK==9 listindices9(t, sols[soli]); +#elif WK==7 + listindices7(t, sols[soli]); #elif WK==5 listindices5(t, sols[soli]); #else