Added CUDA threads to API.

This commit is contained in:
XMRig 2019-10-28 13:18:00 +07:00
parent 99fe304c1f
commit 8cd265c38c
4 changed files with 35 additions and 3 deletions

View file

@ -115,5 +115,15 @@ void xmrig::CudaDevice::generate(const Algorithm &algorithm, CudaThreads &thread
#ifdef XMRIG_FEATURE_API
void xmrig::CudaDevice::toJSON(rapidjson::Value &out, rapidjson::Document &doc) const
{
using namespace rapidjson;
auto &allocator = doc.GetAllocator();
out.AddMember("name", name().toJSON(doc), allocator);
out.AddMember("bus_id", topology().toString().toJSON(doc), allocator);
out.AddMember("smx", smx(), allocator);
out.AddMember("arch", arch(), allocator);
out.AddMember("global_mem", static_cast<uint64_t>(globalMemSize()), allocator);
out.AddMember("clock", clock(), allocator);
out.AddMember("memory_clock", memoryClock(), allocator);
}
#endif