1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-22 20:44:49 +00:00

neoscrypt: reduce a bit the cpu usage

This commit is contained in:
Tanguy Pruvot 2016-07-08 20:04:45 +02:00
parent a4196b341d
commit 26a862c7f6

View File

@ -32,8 +32,12 @@ int scanhash_neoscrypt(int thr_id, struct work* work, uint32_t max_nonce, unsign
{
cudaDeviceSynchronize();
cudaSetDevice(dev_id);
cudaDeviceSetCacheConfig(cudaFuncCachePreferL1);
cudaGetLastError(); // reset errors if device is not "reset"
if (opt_cudaschedule == -1 && gpu_threads == 1) {
cudaDeviceReset();
// reduce cpu usage
cudaSetDeviceFlags(cudaDeviceScheduleBlockingSync);
cudaGetLastError(); // reset errors if device is not "reset"
}
if (device_sm[dev_id] <= 300) {
gpulog(LOG_ERR, thr_id, "Sorry neoscrypt is not supported on SM 3.0 devices");