Permalink
Browse files

fix error "extra text after expected end of number"

1 parent 3fb52a7 commit 9595c17d8dfda78a61f7f3f8116a648b71833545 @KlausT committed Oct 5, 2016
Showing with 12 additions and 12 deletions.
  1. +1 −1 Algo256/cuda_blake256.cu
  2. +10 −10 neoscrypt/cuda_neoscrypt.cu
  3. +1 −1 pentablake.cu
@@ -66,7 +66,7 @@ static const uint32_t c_u256[16] =
#define hostGS(a,b,c,d,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[d] = ROTR32(v[d] ^ v[a], 16); \
v[c] += v[d]; \
@@ -199,11 +199,11 @@ c += d; b = rotate(b^c, 7); \
#else
#define BLAKE_G(idx0, idx1, a, b, c, d, key) { \
idx = BLAKE2S_SIGMA[idx0][idx1]; a += key[idx]; \
- a += b; d = rotate(d^a,16); \
- c += d; b = rotateR(b^c, 12); \
- idx = BLAKE2S_SIGMA[idx0][idx1+1]; a += key[idx]; \
- a += b; d = rotateR(d^a,8); \
- c += d; b = rotateR(b^c, 7); \
+ a += b; d = rotate(d ^ a,16); \
+ c += d; b = rotateR(b ^ c, 12); \
+ idx = BLAKE2S_SIGMA[idx0][idx1 + 1]; a += key[idx]; \
+ a += b; d = rotateR(d ^ a,8); \
+ c += d; b = rotateR(b ^ c, 7); \
}
#endif
@@ -300,12 +300,12 @@ c += d; b = rotate(b^c, 7); \
#define BLAKE_Ghost(idx0, idx1, a, b, c, d, key) { \
idx = BLAKE2S_SIGMA_host[idx0][idx1]; \
a += b + key[idx]; \
- d = ROTR32(d^a, 16); \
- c += d; b = ROTR32(b^c, 12); \
- idx = BLAKE2S_SIGMA_host[idx0][idx1+1]; \
+ d = ROTR32(d ^ a, 16); \
+ c += d; b = ROTR32(b ^ c, 12); \
+ idx = BLAKE2S_SIGMA_host[idx0][idx1 + 1]; \
a += b + key[idx]; \
- d = ROTR32(d^a, 8); \
- c += d; b = ROTR32(b^c, 7); \
+ d = ROTR32(d ^ a, 8); \
+ c += d; b = ROTR32(b ^ c, 7); \
}
#if __CUDA_ARCH__ < 500
static __forceinline__ __device__ void Blake2S(uint32_t *out, const uint32_t* __restrict__ inout, const uint32_t * __restrict__ TheKey)
View
@@ -108,7 +108,7 @@ const uint64_t c_u512[16] =
#define G(a,b,c,d,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[d] = SWAPDWORDS(v[d] ^ v[a]); \
v[c] += v[d]; \

0 comments on commit 9595c17

Please sign in to comment.