Prevent CPU usage in --debug_opencl (#2822)
* Prevent CPU usage in --debug_opencl * Clang formatting
This commit is contained in:
parent
489effe49f
commit
fe960112b5
1 changed files with 2 additions and 2 deletions
|
@ -610,10 +610,10 @@ int main (int argc, char * const * argv)
|
|||
nano::logger_mt logger;
|
||||
nano::opencl_config config (platform, device, threads);
|
||||
auto opencl (nano::opencl_work::create (true, config, logger));
|
||||
nano::work_pool work_pool (std::numeric_limits<unsigned>::max (), std::chrono::nanoseconds (0), opencl ? [&opencl](nano::work_version const version_a, nano::root const & root_a, uint64_t difficulty_a, std::atomic<int> &) {
|
||||
nano::work_pool work_pool (0, std::chrono::nanoseconds (0), opencl ? [&opencl](nano::work_version const version_a, nano::root const & root_a, uint64_t difficulty_a, std::atomic<int> &) {
|
||||
return opencl->generate_work (version_a, root_a, difficulty_a);
|
||||
}
|
||||
: std::function<boost::optional<uint64_t> (nano::work_version const, nano::root const &, uint64_t, std::atomic<int> &)> (nullptr));
|
||||
: std::function<boost::optional<uint64_t> (nano::work_version const, nano::root const &, uint64_t, std::atomic<int> &)> (nullptr));
|
||||
nano::change_block block (0, 0, nano::keypair ().prv, 0, 0);
|
||||
std::cerr << boost::str (boost::format ("Starting OpenCL generation profiling. Platform: %1%. Device: %2%. Threads: %3%. Difficulty: %4$#x (%5%x from base difficulty %6$#x)\n") % platform % device % threads % difficulty % nano::to_string (nano::difficulty::to_multiplier (difficulty, network_constants.publish_full.base), 4) % network_constants.publish_full.base);
|
||||
for (uint64_t i (0); true; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue