1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-02-02 10:03:05 -05:00

Added version information to API.

This commit is contained in:
XMRig
2019-10-29 14:25:40 +07:00
parent 9dfa38f1e7
commit b1eac17d60
3 changed files with 20 additions and 4 deletions

View File

@@ -204,6 +204,12 @@ nvid_ctx *xmrig::CudaLib::alloc(uint32_t id, int32_t bfactor, int32_t bsleep) no
}
std::string xmrig::CudaLib::version(uint32_t version)
{
return std::to_string(version / 1000) + "." + std::to_string((version % 1000) / 10);
}
std::vector<xmrig::CudaDevice> xmrig::CudaLib::devices(int32_t bfactor, int32_t bsleep) noexcept
{
const uint32_t count = deviceCount();