summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/iBackend.hpp
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-11-13 20:17:08 +0000
committerGitHub <noreply@github.com>2017-11-13 20:17:08 +0000
commitb1645f6e26a7f1d0d907b4911ddf4ac6bc933166 (patch)
tree330ee4c2b2c3f840ac8457ee08ee0f3030680e28 /xmrstak/backend/iBackend.hpp
parentb63593379e31f57aa10346aa831770fc9359a620 (diff)
parentb0a9ddc1a1e4a5ab1e46a19be4720e90ab1f9bbe (diff)
downloadxmr-stak-b1645f6e26a7f1d0d907b4911ddf4ac6bc933166.zip
xmr-stak-b1645f6e26a7f1d0d907b4911ddf4ac6bc933166.tar.gz
Merge pull request #104 from psychocrypt/topic-hashrateReportCli
improve cli hash report
Diffstat (limited to 'xmrstak/backend/iBackend.hpp')
-rw-r--r--xmrstak/backend/iBackend.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/xmrstak/backend/iBackend.hpp b/xmrstak/backend/iBackend.hpp
index ab964ce..dbfbc99 100644
--- a/xmrstak/backend/iBackend.hpp
+++ b/xmrstak/backend/iBackend.hpp
@@ -5,15 +5,31 @@
#include <atomic>
#include <cstdint>
#include <climits>
-
+#include <vector>
+#include <string>
namespace xmrstak
{
struct iBackend
{
+
+ enum BackendType : uint32_t { UNKNOWN = 0, CPU = 1u, AMD = 2u, NVIDIA = 3u };
+
+ static std::string getName(const BackendType type)
+ {
+ std::vector<std::string> backendNames = {
+ "UNKNOWN",
+ "CPU",
+ "AMD",
+ "NVIDIA"
+ };
+ return backendNames[static_cast<uint32_t>(type)];
+ }
+
std::atomic<uint64_t> iHashCount;
std::atomic<uint64_t> iTimestamp;
uint32_t iThreadNo;
+ BackendType backendType = UNKNOWN;
iBackend() : iHashCount(0), iTimestamp(0)
{
OpenPOWER on IntegriCloud