Skip to content

Commit

Permalink
hashposition should be unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausT committed May 29, 2015
1 parent db3b59c commit 3c2b698
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion JHA/cuda_jha_keccak512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ __global__ void jackpot_keccak512_gpu_hash(uint32_t threads, uint32_t startNounc
{
const uint32_t nounce = startNounce + thread;

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;

// Nachricht kopieren
uint32_t message[18];
Expand Down
2 changes: 1 addition & 1 deletion quark/cuda_bmw512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void quark_bmw512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t *
{
const uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint64_t *const inpHash = &g_hash[8 * hashPosition];

uint2 msg[16];
Expand Down
2 changes: 1 addition & 1 deletion quark/cuda_jh512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void quark_jh512_gpu_hash_64_final(uint32_t threads, uint32_t startNounce, uint6
{
const uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = (uint32_t*)&g_hash[8 * hashPosition];

uint32_t x[8][4] = {
Expand Down
2 changes: 1 addition & 1 deletion quark/cuda_jh512keccak512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void quark_jh512Keccak512_gpu_hash_64(uint32_t threads, uint32_t startNounce, ui
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *Hash = &g_hash[16 * hashPosition];
uint32_t x[8][4] = {
{ 0x964bd16f, 0x17aa003e, 0x052e6a63, 0x43d5157a },
Expand Down
4 changes: 2 additions & 2 deletions quark/cuda_quark_blake512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void quark_blake512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint32_t
#if USE_SHUFFLE
const int warpID = threadIdx.x & 0x0F; // 16 warps
const int warpBlockID = (thread + 15)>>4; // aufrunden auf volle Warp-Blöcke
const int maxHashPosition = thread<<3;
const int maxhashPosition = thread<<3;
#endif

#if USE_SHUFFLE
Expand All @@ -46,7 +46,7 @@ void quark_blake512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint32_t
{
const uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;

uint64_t *inpHash = &g_hash[hashPosition*8];
uint2 block[16];
Expand Down
2 changes: 1 addition & 1 deletion quark/cuda_quark_groestl512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ quark_doublegroestl512_gpu_hash_64_quad(uint32_t threads, uint32_t startNounce,

const uint32_t nounce = g_nonceVector ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t * inpHash = &g_hash[hashPosition<<4];
const uint16_t thr = threadIdx.x & (THF-1);

Expand Down
4 changes: 2 additions & 2 deletions quark/cuda_quark_keccak512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void quark_keccak512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint2 *
{
uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

int hashPosition = nounce - startNounce;
uint32_t hashPosition = nounce - startNounce;
uint2 *inpHash = &g_hash[8 * hashPosition];

uint2 s[25];
Expand Down Expand Up @@ -148,7 +148,7 @@ void quark_keccak512_gpu_hash_64_final(uint32_t threads, uint32_t startNounce, u
{
const uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint2 *inpHash = &g_hash[8 * hashPosition];

uint2 s[25] =
Expand Down
4 changes: 2 additions & 2 deletions quark/cuda_skein512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void quark_skein512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t

const uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint64_t *Hash = &g_hash[8 * hashPosition];

h[0] = skein_p[0] = vectorize(Hash[0]);
Expand Down Expand Up @@ -1912,7 +1912,7 @@ void quark_skein512_gpu_hash_64_final(const uint32_t threads, const uint32_t sta

const uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
const uint64_t *const inpHash = &g_hash[8 * hashPosition];

h0 = make_uint2(0x749C51CEull, 0x4903ADFF);
Expand Down
2 changes: 1 addition & 1 deletion x11/cuda_x11_cubehash512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void x11_cubehash512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint32_
{
const uint32_t nounce = startNounce + thread;

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = &g_hash[16 * hashPosition];

uint32_t x[2][2][2][2][2] =
Expand Down
4 changes: 2 additions & 2 deletions x11/cuda_x11_echo.cu
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void x11_echo512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint32_t *c
if (thread < threads)
{
const uint32_t nounce = (startNounce + thread);
const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = &g_hash[hashPosition<<4];
cuda_echo_round(sharedMemory, Hash);
}
Expand Down Expand Up @@ -462,7 +462,7 @@ void x11_echo512_gpu_hash_64_final(uint32_t threads, uint32_t startNounce, const

const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
const uint32_t *const Hash = (uint32_t*)&g_hash[hashPosition *8];

uint32_t h[16];
Expand Down
2 changes: 1 addition & 1 deletion x11/cuda_x11_luffa512_Cubehash.cu
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ void x11_luffaCubehash512_gpu_hash_64(uint32_t threads, uint32_t startNounce, ui
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = (uint32_t*)&g_hash[8 * hashPosition];

uint32_t statebuffer[8];
Expand Down
2 changes: 1 addition & 1 deletion x11/cuda_x11_shavite512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ void x11_shavite512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = (uint32_t*)&g_hash[hashPosition*8];

// kopiere init-state
Expand Down
10 changes: 5 additions & 5 deletions x11/cuda_x11_simd512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ x11_simd512_gpu_expand_64(uint32_t threads, uint32_t startNounce, const uint64_t
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;

uint32_t *inpHash = (uint32_t*)&g_hash[8 * hashPosition];

Expand All @@ -571,7 +571,7 @@ x11_simd512_gpu_compress1_64(uint32_t threads, uint32_t startNounce, uint64_t *g
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = (uint32_t*)&g_hash[8 * hashPosition];

Compression1(Hash, hashPosition, g_fft4, g_state);
Expand All @@ -585,7 +585,7 @@ x11_simd512_gpu_compress2_64(uint32_t threads, uint32_t startNounce, uint64_t *g
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;

Compression2(hashPosition, g_fft4, g_state);
}
Expand All @@ -600,7 +600,7 @@ x11_simd512_gpu_compress_64_maxwell(uint32_t threads, uint32_t startNounce, uint
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = (uint32_t*)&g_hash[8 * hashPosition];

Compression1(Hash, hashPosition, g_fft4, g_state);
Expand All @@ -617,7 +617,7 @@ x11_simd512_gpu_final_64(uint32_t threads, uint32_t startNounce, uint64_t *g_has
{
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = (uint32_t*)&g_hash[8 * hashPosition];

Final(Hash, hashPosition, g_fft4, g_state);
Expand Down
4 changes: 2 additions & 2 deletions x13/cuda_x13_fugue512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ void x13_fugue512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint32_t *
}
const uint32_t nounce = (startNounce + thread);

const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *const Hash = &g_hash[hashPosition*16];

#pragma unroll 16
Expand Down Expand Up @@ -862,7 +862,7 @@ void x13_fugue512_gpu_hash_64_final(const uint32_t threads, const uint32_t start
mixtabs[(768 + threadIdx.x)] = ROTR32(mixtabs[threadIdx.x], 24);
}
const uint32_t nounce = (startNounce + thread);
const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
const uint32_t *h = &g_hash[hashPosition * 16];
uint32_t Hash[16];
#pragma unroll 16
Expand Down
2 changes: 1 addition & 1 deletion x17/cuda_x17_haval512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void x17_haval256_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t *
if (thread < threads)
{
const uint32_t nounce = (startNounce + thread);
const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *inpHash = (uint32_t*)&g_hash[8 * hashPosition];
union {
uint8_t h1[64];
Expand Down
2 changes: 1 addition & 1 deletion x17/cuda_x17_sha512.cu
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void x17_sha512_gpu_hash_64(uint32_t threads, uint32_t startNounce, uint64_t *g_
if (thread < threads)
{
const uint32_t nounce = (startNounce + thread);
const int hashPosition = nounce - startNounce;
const uint32_t hashPosition = nounce - startNounce;
uint32_t *inpHash = (uint32_t*)&g_hash[8 * hashPosition];
union {
uint8_t h1[64];
Expand Down

0 comments on commit 3c2b698

Please sign in to comment.