diff options
Diffstat (limited to 'xmrstak/backend/amd')
-rw-r--r-- | xmrstak/backend/amd/amd_gpu/gpu.cpp | 6 | ||||
-rw-r--r-- | xmrstak/backend/amd/minethd.cpp | 10 | ||||
-rw-r--r-- | xmrstak/backend/amd/minethd.hpp | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index 135cac0..791ceb2 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -478,7 +478,7 @@ std::vector<GpuContext> getAMDDevices(int index) ctxVec.push_back(ctx); } } - + free(device_list); free(platforms); @@ -565,7 +565,7 @@ size_t InitOpenCL(GpuContext* ctx, size_t num_gpus, size_t platform_idx) { printer::inst()->print_msg(L1,"WARNING: using non AMD device: %s", platformName.c_str()); } - + free(platforms); /*MSVC skimping on devel costs by shoehorning C99 to be a subset of C++? Noooo... can't be.*/ @@ -674,7 +674,7 @@ size_t XMRSetJob(GpuContext* ctx, uint8_t* input, size_t input_len, uint64_t tar input[input_len] = 0x01; memset(input + input_len + 1, 0, 88 - input_len - 1); - + size_t numThreads = ctx->rawIntensity; if((ret = clEnqueueWriteBuffer(ctx->CommandQueues, ctx->InputBuffer, CL_TRUE, 0, 88, input, 0, NULL, NULL)) != CL_SUCCESS) diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp index 1582872..c1399e0 100644 --- a/xmrstak/backend/amd/minethd.cpp +++ b/xmrstak/backend/amd/minethd.cpp @@ -61,7 +61,7 @@ minethd::minethd(miner_work& pWork, size_t iNo, GpuContext* ctx, const jconf::th std::unique_lock<std::mutex> lck(thd_aff_set); std::future<void> order_guard = order_fix.get_future(); - + oWorkThd = std::thread(&minethd::work_main, this); order_guard.wait(); @@ -126,7 +126,7 @@ std::vector<iBackend*>* minethd::thread_starter(uint32_t threadOffset, miner_wor printer::inst()->print_msg(L1, "WARNING: AMD device not found"); return pvThreads; } - + size_t i, n = jconf::inst()->GetThreadCount(); pvThreads->reserve(n); @@ -172,7 +172,7 @@ void minethd::consume_work() memcpy(&oWork, &globalStates::inst().oGlobalWork, sizeof(miner_work)); iJobNo++; globalStates::inst().iConsumeCnt++; - + } void minethd::work_main() @@ -184,13 +184,13 @@ void minethd::work_main() std::unique_lock<std::mutex> lck(thd_aff_set); lck.release(); std::this_thread::yield(); - + uint64_t iCount = 0; cryptonight_ctx* cpu_ctx; cpu_ctx = cpu::minethd::minethd_alloc_ctx(); cn_hash_fun hash_fun = cpu::minethd::func_selector(::jconf::inst()->HaveHardwareAes(), true /*bNoPrefetch*/, ::jconf::inst()->IsCurrencyMonero()); globalStates::inst().iConsumeCnt++; - + while (bQuit == 0) { if (oWork.bStall) diff --git a/xmrstak/backend/amd/minethd.hpp b/xmrstak/backend/amd/minethd.hpp index c808192..29ddb74 100644 --- a/xmrstak/backend/amd/minethd.hpp +++ b/xmrstak/backend/amd/minethd.hpp @@ -26,9 +26,9 @@ public: private: typedef void (*cn_hash_fun)(const void*, size_t, void*, cryptonight_ctx*); - + minethd(miner_work& pWork, size_t iNo, GpuContext* ctx, const jconf::thd_cfg cfg); - + void work_main(); void consume_work(); |