Skip to content

Commit

Permalink
use sp's version of quark blake
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausT committed May 12, 2016
1 parent 0e654bd commit 76fa203
Show file tree
Hide file tree
Showing 2 changed files with 734 additions and 289 deletions.
14 changes: 14 additions & 0 deletions cuda_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,13 @@ static __device__ __forceinline__ uint2 vectorizehigh(uint32_t v) {
result.y = v;
return result;
}
static __device__ __forceinline__ uint2 eorswap32(uint2 u, uint2 v)
{
uint2 result;
result.y = u.x ^ v.x;
result.x = u.y ^ v.y;
return result;
}

static __device__ __forceinline__ uint2 operator^ (uint2 a, uint32_t b) { return make_uint2(a.x^ b, a.y); }
static __device__ __forceinline__ uint2 operator^ (uint2 a, uint2 b) { return make_uint2(a.x ^ b.x, a.y ^ b.y); }
Expand Down Expand Up @@ -960,6 +967,13 @@ static __device__ __forceinline__ uint2 vectorizeswap(uint64_t v)
return result;
}

static __device__ __forceinline__ uint2 cuda_swap(uint2 v)
{
uint32_t t = cuda_swab32(v.x);
v.x = cuda_swab32(v.y);
v.y = t;
return v;
}

__device__ __forceinline__ uint32_t devectorize16(ushort2 x)
{
Expand Down
Loading

0 comments on commit 76fa203

Please sign in to comment.