Skip to content

Commit

Permalink
Possible fix for mixed speed cards
Browse files Browse the repository at this point in the history
  • Loading branch information
catia przybylski committed Aug 13, 2014
1 parent 3699a18 commit b5f1542
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cuda_sha256.cu
Expand Up @@ -500,8 +500,8 @@ void sha256_scanhash(int throughput, uint64_t startNounce, CBlockHeader *hdr, ui
sha256_cpu_hash_242(pctx->thr_id, throughput,startNounce,pctx->sha256_dblock,d_hash);
}

void sha256_fullhash(int throughput, uint64_t *data, uint64_t *hash){
sha256_cpu_fullhash(0,throughput,data,hash);
void sha256_fullhash(int throughput, uint64_t *data, uint64_t *hash, ctx* pctx){
sha256_cpu_fullhash(pctx->thr_id,throughput,data,hash);
}


6 changes: 3 additions & 3 deletions trashminer.cu
Expand Up @@ -96,7 +96,7 @@ extern void tiger_scanhash(int throughput, uint64_t nonce, CBlockHeader *hdr, ui
extern void ripemd_scanhash(int throughput, uint64_t nonce, CBlockHeader *hdr, uint64_t *hash, ctx* pctx);
extern void keccak512_scanhash(int throughput, uint64_t nonce, CBlockHeader *hdr, uint64_t *hash, ctx* pctx);
extern void whirlpool_scanhash(int throughput, uint64_t nonce, CBlockHeader *hdr, uint64_t *hash, ctx* pctx);
extern void sha256_fullhash(int throughput, uint64_t *data, uint64_t *hash);
extern void sha256_fullhash(int throughput, uint64_t *data, uint64_t *hash, ctx* pctx);
extern void checkhash(int throughput, uint64_t *data, uint32_t *results, uint64_t target);

extern void cpu_mul(int order, int threads, uint32_t alegs, uint32_t blegs, uint64_t *g_a, uint64_t *g_b, uint64_t *g_p);
Expand Down Expand Up @@ -312,7 +312,7 @@ uint64_t cuda_scanhash(void *vctx, void* data, void* t){
cpu_mul(0, throughput, 3, 35, pctx->d_hash[6], pctx->d_prod[0], pctx->d_prod[1]); //105
MyStreamSynchronize(0,13,pctx->thr_id);

sha256_fullhash(throughput,pctx->d_prod[1],pctx->d_hash[7]);
sha256_fullhash(throughput,pctx->d_prod[1],pctx->d_hash[7],pctx);

uint64_t startNonce = hdr.nNonce;

Expand Down Expand Up @@ -354,7 +354,7 @@ uint64_t cuda_scanhash(void *vctx, void* data, void* t){
uint32_t set = pctx->results[sofst + word];
uint32_t r = (set >> (thread%32)) & 1;
if(r){
printf("Checkhash found a winner, nonce %ld\n", startNonce + i* 0x100000000ULL);
printf("Checkhash found a winner, nonce %lld\n", startNonce + i* 0x100000000ULL);
hdr.nNonce = startNonce+i* 0x100000000ULL;
#ifdef PROF
cudaDeviceReset();
Expand Down

0 comments on commit b5f1542

Please sign in to comment.