Skip to content

Commit

Permalink
Merge pull request #98 from agusdallalba/master
Browse files Browse the repository at this point in the history
Fix build error on Cuda toolkit 10.1
  • Loading branch information
tromp authored May 24, 2019
2 parents 0f65204 + 9059d35 commit 93975e9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions src/cuckatoo/mean.cu
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ const u64 ROW_EDGES_B = EDGES_B * NY;
__constant__ uint2 recoveredges[PROOFSIZE];
__constant__ uint2 e0 = {0,0};

__device__ uint2 make_Edge(const u32 nonce, const uint2 dummy, const u32 node0, const u32 node1) {
return make_uint2(node0, node1);
}

__device__ uint2 make_Edge(const uint2 edge, const uint2 dummy, const u32 node0, const u32 node1) {
return edge;
}

__device__ u32 make_Edge(const u32 nonce, const u32 dummy, const u32 node0, const u32 node1) {
return nonce;
}

#ifndef FLUSHA // should perhaps be in trimparams and passed as template parameter
#define FLUSHA 16
#endif
Expand Down Expand Up @@ -224,18 +236,6 @@ __device__ __forceinline__ bool bitmaptest(u32 *ebitmap, const int bucket) {
return (ebitmap[word] >> bit) & 1;
}

__device__ uint2 make_Edge(const u32 nonce, const uint2 dummy, const u32 node0, const u32 node1) {
return make_uint2(node0, node1);
}

__device__ uint2 make_Edge(const uint2 edge, const uint2 dummy, const u32 node0, const u32 node1) {
return edge;
}

__device__ u32 make_Edge(const u32 nonce, const u32 dummy, const u32 node0, const u32 node1) {
return nonce;
}

template <typename Edge> u32 __device__ endpoint(const siphash_keys &sipkeys, Edge e, int uorv);

__device__ u32 endpoint(const siphash_keys &sipkeys, u32 nonce, int uorv) {
Expand Down
24 changes: 12 additions & 12 deletions src/cuckoo/mean.cu
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ const u32 ROW_EDGES_B = EDGES_B * NY;
__constant__ uint2 recoveredges[PROOFSIZE];
__constant__ uint2 e0 = {0,0};

__device__ uint2 make_Edge(const u32 nonce, const uint2 dummy, const u32 node0, const u32 node1) {
return make_uint2(node0, node1);
}

__device__ uint2 make_Edge(const uint2 edge, const uint2 dummy, const u32 node0, const u32 node1) {
return edge;
}

__device__ u32 make_Edge(const u32 nonce, const u32 dummy, const u32 node0, const u32 node1) {
return nonce;
}

#ifndef FLUSHA // should perhaps be in trimparams and passed as template parameter
#define FLUSHA 16
#endif
Expand Down Expand Up @@ -213,18 +225,6 @@ __device__ __forceinline__ bool Read2bCounter(u32 *ecounters, const int bucket)
return (ecounters[word + NZ/32] & mask) != 0;
}

__device__ uint2 make_Edge(const u32 nonce, const uint2 dummy, const u32 node0, const u32 node1) {
return make_uint2(node0, node1);
}

__device__ uint2 make_Edge(const uint2 edge, const uint2 dummy, const u32 node0, const u32 node1) {
return edge;
}

__device__ u32 make_Edge(const u32 nonce, const u32 dummy, const u32 node0, const u32 node1) {
return nonce;
}

template <typename Edge> u32 __device__ endpoint(const siphash_keys &sipkeys, Edge e, int uorv);

__device__ u32 endpoint(const siphash_keys &sipkeys, u32 nonce, int uorv) {
Expand Down

0 comments on commit 93975e9

Please sign in to comment.