Skip to content

Commit

Permalink
fix error "extra text after expected end of number"
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausT committed Oct 5, 2016
1 parent 3fb52a7 commit 9595c17
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Algo256/cuda_blake256.cu
Expand Up @@ -66,7 +66,7 @@ static const uint32_t c_u256[16] =


#define hostGS(a,b,c,d,x) { \ #define hostGS(a,b,c,d,x) { \
const uint8_t idx1 = c_sigma[r][x]; \ const uint8_t idx1 = c_sigma[r][x]; \
const uint8_t idx2 = c_sigma[r][x+1]; \ const uint8_t idx2 = c_sigma[r][x + 1]; \
v[a] += (m[idx1] ^ c_u256[idx2]) + v[b]; \ v[a] += (m[idx1] ^ c_u256[idx2]) + v[b]; \
v[d] = ROTR32(v[d] ^ v[a], 16); \ v[d] = ROTR32(v[d] ^ v[a], 16); \
v[c] += v[d]; \ v[c] += v[d]; \
Expand Down
20 changes: 10 additions & 10 deletions neoscrypt/cuda_neoscrypt.cu
Expand Up @@ -199,11 +199,11 @@ c += d; b = rotate(b^c, 7); \
#else #else
#define BLAKE_G(idx0, idx1, a, b, c, d, key) { \ #define BLAKE_G(idx0, idx1, a, b, c, d, key) { \
idx = BLAKE2S_SIGMA[idx0][idx1]; a += key[idx]; \ idx = BLAKE2S_SIGMA[idx0][idx1]; a += key[idx]; \
a += b; d = rotate(d^a,16); \ a += b; d = rotate(d ^ a,16); \
c += d; b = rotateR(b^c, 12); \ c += d; b = rotateR(b ^ c, 12); \
idx = BLAKE2S_SIGMA[idx0][idx1+1]; a += key[idx]; \ idx = BLAKE2S_SIGMA[idx0][idx1 + 1]; a += key[idx]; \
a += b; d = rotateR(d^a,8); \ a += b; d = rotateR(d ^ a,8); \
c += d; b = rotateR(b^c, 7); \ c += d; b = rotateR(b ^ c, 7); \
} }
#endif #endif


Expand Down Expand Up @@ -300,12 +300,12 @@ c += d; b = rotate(b^c, 7); \
#define BLAKE_Ghost(idx0, idx1, a, b, c, d, key) { \ #define BLAKE_Ghost(idx0, idx1, a, b, c, d, key) { \
idx = BLAKE2S_SIGMA_host[idx0][idx1]; \ idx = BLAKE2S_SIGMA_host[idx0][idx1]; \
a += b + key[idx]; \ a += b + key[idx]; \
d = ROTR32(d^a, 16); \ d = ROTR32(d ^ a, 16); \
c += d; b = ROTR32(b^c, 12); \ c += d; b = ROTR32(b ^ c, 12); \
idx = BLAKE2S_SIGMA_host[idx0][idx1+1]; \ idx = BLAKE2S_SIGMA_host[idx0][idx1 + 1]; \
a += b + key[idx]; \ a += b + key[idx]; \
d = ROTR32(d^a, 8); \ d = ROTR32(d ^ a, 8); \
c += d; b = ROTR32(b^c, 7); \ c += d; b = ROTR32(b ^ c, 7); \
} }
#if __CUDA_ARCH__ < 500 #if __CUDA_ARCH__ < 500
static __forceinline__ __device__ void Blake2S(uint32_t *out, const uint32_t* __restrict__ inout, const uint32_t * __restrict__ TheKey) static __forceinline__ __device__ void Blake2S(uint32_t *out, const uint32_t* __restrict__ inout, const uint32_t * __restrict__ TheKey)
Expand Down
2 changes: 1 addition & 1 deletion pentablake.cu
Expand Up @@ -108,7 +108,7 @@ const uint64_t c_u512[16] =


#define G(a,b,c,d,x) { \ #define G(a,b,c,d,x) { \
uint32_t idx1 = c_sigma[i][x]; \ uint32_t idx1 = c_sigma[i][x]; \
uint32_t idx2 = c_sigma[i][x+1]; \ uint32_t idx2 = c_sigma[i][x + 1]; \
v[a] += (m[idx1] ^ c_u512[idx2]) + v[b]; \ v[a] += (m[idx1] ^ c_u512[idx2]) + v[b]; \
v[d] = SWAPDWORDS(v[d] ^ v[a]); \ v[d] = SWAPDWORDS(v[d] ^ v[a]); \
v[c] += v[d]; \ v[c] += v[d]; \
Expand Down

0 comments on commit 9595c17

Please sign in to comment.