more cuda 192,7 support

This commit is contained in:
John Tromp 2018-06-09 14:14:52 +02:00
parent 8d85a6cdb5
commit e36ff05210
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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