1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 08:23:34 -05:00

KawPow OpenCL: build next period only when it's not in cache

This commit is contained in:
SChernykh
2022-01-24 13:28:58 +01:00
parent 14aacf8636
commit e0701f9dad

View File

@@ -439,7 +439,9 @@ cl_kernel OclKawPow::get(const IOclRunner &runner, uint64_t height, uint32_t wor
{
const uint64_t period = height / KPHash::PERIOD_LENGTH;
if (!cache.search(runner, period + 1, worksize)) {
builder.build_async(runner, period + 1, worksize);
}
cl_kernel kernel = cache.search(runner, period, worksize);
if (kernel) {