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;
builder.build_async(runner, period + 1, worksize);
if (!cache.search(runner, period + 1, worksize)) {
builder.build_async(runner, period + 1, worksize);
}
cl_kernel kernel = cache.search(runner, period, worksize);
if (kernel) {