more cuda 192,7 support
This commit is contained in:
parent
8d85a6cdb5
commit
e36ff05210
|
@ -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);
|
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) {
|
__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));
|
memcpy(state->buf + state->buflen, &leb, sizeof(u32));
|
||||||
state->buflen += sizeof(u32);
|
state->buflen += sizeof(u32);
|
||||||
state->counter += state->buflen;
|
state->counter += state->buflen;
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
typedef uint16_t u16;
|
typedef uint16_t u16;
|
||||||
typedef uint64_t u64;
|
typedef uint64_t u64;
|
||||||
|
|
||||||
|
#define htole32(x) (x)
|
||||||
|
|
||||||
#define checkCudaErrors(ans) { gpuAssert((ans), __FILE__, __LINE__); }
|
#define checkCudaErrors(ans) { gpuAssert((ans), __FILE__, __LINE__); }
|
||||||
inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) {
|
inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) {
|
||||||
if (code != cudaSuccess) {
|
if (code != cudaSuccess) {
|
||||||
|
@ -290,6 +292,8 @@ struct equi {
|
||||||
if (soli < MAXSOLS)
|
if (soli < MAXSOLS)
|
||||||
#if WK==9
|
#if WK==9
|
||||||
listindices9(t, sols[soli]);
|
listindices9(t, sols[soli]);
|
||||||
|
#elif WK==7
|
||||||
|
listindices7(t, sols[soli]);
|
||||||
#elif WK==5
|
#elif WK==5
|
||||||
listindices5(t, sols[soli]);
|
listindices5(t, sols[soli]);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue