@@ -34,15 +34,7 @@ struct CUDAChannel: public LogChannel
34
34
static const bool debug = false ;
35
35
};
36
36
37
- struct CUDASwitchChannel : public LogChannel
38
- {
39
- static const char * name () { return EthOrange " cu" ; }
40
- static const int verbosity = 6 ;
41
- static const bool debug = false ;
42
- };
43
-
44
37
#define cudalog clog (CUDAChannel)
45
- #define cudaswitchlog clog (CUDASwitchChannel)
46
38
47
39
CUDAMiner::CUDAMiner(FarmFace& _farm, unsigned _index) :
48
40
Miner(" cuda-" , _farm, _index),
@@ -431,8 +423,6 @@ void CUDAMiner::search(
431
423
uint64_t _startN,
432
424
const dev::eth::WorkPackage& w)
433
425
{
434
- CUDA_SAFE_CALL (cudaDeviceSynchronize ());
435
-
436
426
uint64_t current_nonce;
437
427
438
428
set_header (*reinterpret_cast <hash32_t const *>(header));
@@ -514,9 +504,12 @@ void CUDAMiner::search(
514
504
addHashCount (batch_size);
515
505
bool t = true ;
516
506
if (m_new_work.compare_exchange_strong (t, false )) {
517
- cudaswitchlog << " Switch time "
518
- << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now () - workSwitchStart).count ()
519
- << " ms." ;
507
+ if (g_logVerbosity >= 6 ) {
508
+ cudalog << " Switch time "
509
+ << std::chrono::duration_cast<std::chrono::milliseconds>
510
+ (std::chrono::high_resolution_clock::now () - workSwitchStart).count ()
511
+ << " ms." ;
512
+ }
520
513
break ;
521
514
}
522
515
if (shouldStop ())
0 commit comments