mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-22 12:34:17 +00:00
whirlpool: add algo free function + vstudio
This commit is contained in:
parent
b641bfdf8b
commit
5f12943de5
@ -461,7 +461,8 @@ extern "C" int scanhash_blake256(int thr_id, struct work* work, uint32_t max_non
|
||||
if (vhashcpu[6] <= Htarg && fulltest(vhashcpu, ptarget)) {
|
||||
pdata[21] = extra_results[0];
|
||||
applog(LOG_BLUE, "1:%x 2:%x", foundNonce, extra_results[0]);
|
||||
work_set_target_ratio(work, vhashcpu);
|
||||
if (bn_hash_target_ratio(vhashcpu, ptarget) > work->shareratio)
|
||||
work_set_target_ratio(work, vhashcpu);
|
||||
rc = 2;
|
||||
}
|
||||
extra_results[0] = UINT32_MAX;
|
||||
|
@ -1543,6 +1543,7 @@ void miner_free_device(int thr_id)
|
||||
free_skeincoin(thr_id);
|
||||
free_skein2(thr_id);
|
||||
free_s3(thr_id);
|
||||
free_whirl(thr_id);
|
||||
free_whirlx(thr_id);
|
||||
free_x11(thr_id);
|
||||
free_x13(thr_id);
|
||||
|
@ -493,6 +493,7 @@
|
||||
<CudaCompile Include="x15\x15.cu" />
|
||||
<CudaCompile Include="x15\cuda_whirlpoolx.cu" />
|
||||
<CudaCompile Include="x15\whirlpoolx.cu" />
|
||||
<CudaCompile Include="x15\whirlpool.cu" />
|
||||
<CudaCompile Include="x17\x17.cu">
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="x17\cuda_x17_haval512.cu">
|
||||
|
@ -556,6 +556,9 @@
|
||||
<CudaCompile Include="x15\whirlpoolx.cu">
|
||||
<Filter>Source Files\CUDA\x15</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="x15\whirlpool.cu">
|
||||
<Filter>Source Files\CUDA\x15</Filter>
|
||||
</CudaCompile>
|
||||
<CudaCompile Include="x17\cuda_x17_haval512.cu">
|
||||
<Filter>Source Files\CUDA\x17</Filter>
|
||||
</CudaCompile>
|
||||
|
@ -13,6 +13,7 @@ static uint32_t *d_hash[MAX_GPUS];
|
||||
|
||||
extern void x15_whirlpool_cpu_init(int thr_id, uint32_t threads, int mode);
|
||||
extern void x15_whirlpool_cpu_hash_64(int thr_id, uint32_t threads, uint32_t startNounce, uint32_t *d_nonceVector, uint32_t *d_hash, int order);
|
||||
extern void x15_whirlpool_cpu_free(int thr_id);
|
||||
|
||||
extern void whirlpool512_setBlock_80(void *pdata, const void *ptarget);
|
||||
extern void whirlpool512_cpu_hash_80(int thr_id, uint32_t threads, uint32_t startNounce, uint32_t *d_hash, int order);
|
||||
@ -118,3 +119,20 @@ extern "C" int scanhash_whirl(int thr_id, struct work* work, uint32_t max_nonce,
|
||||
*hashes_done = pdata[19] - first_nonce;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// cleanup
|
||||
extern "C" void free_whirl(int thr_id)
|
||||
{
|
||||
if (!init[thr_id])
|
||||
return;
|
||||
|
||||
cudaSetDevice(device_map[thr_id]);
|
||||
|
||||
cudaFree(d_hash[thr_id]);
|
||||
|
||||
x15_whirlpool_cpu_free(thr_id);
|
||||
init[thr_id] = false;
|
||||
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user