Skip to content

Commit

Permalink
Prevent CPU usage in --debug_opencl (#2822)
Browse files Browse the repository at this point in the history
* Prevent CPU usage in --debug_opencl
* Clang formatting
  • Loading branch information
SergiySW authored Jun 29, 2020
1 parent 489effe commit fe96011
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nano/nano_node/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe96011

Please sign in to comment.