DLTcollab / dcurl

Hardware-accelerated Multi-threaded IOTA PoW, drop-in replacement for ccurl
MIT License
41 stars 23 forks source link

feat: Allocate thread resource based on the physical processor #195

Closed marktwtn closed 5 years ago

marktwtn commented 5 years ago

The original design has contradiction. It uses almost all the logical processors for a single PoW, but allows dcurl to handle 2 PoW at the same time based on the hyper-threading.

The new function is added in cpu-utils.h to detect the thread number per physical processor, which also shows whether the hyper-threading is enabled or not. Once we know the status of hyper-threading, we can determine the threadpool size and the thread number for a single PoW.

Close #191.

marktwtn commented 5 years ago

It turns out that the method to acquire processor information differs in different architecture. I'll figure out another way to implement it on ARM and macOS system.

marktwtn commented 5 years ago

The Travis CI does not pass. It might be caused by the lacking software which should be installed in .travis.yml.