});
}
static reset(loss) {
- console.dir(loss);
- console.warn(`Device lost. Reinitializing...`);
- console.dir(_NanoPowGpu);
- console.dir(_NanoPowGpu.#cpuBuffer);
- if (_NanoPowGpu.#cpuBuffer) _NanoPowGpu.#cpuBuffer.destroy();
- if (_NanoPowGpu.#gpuBuffer) _NanoPowGpu.#gpuBuffer.destroy();
- if (_NanoPowGpu.#uboBuffer) _NanoPowGpu.#uboBuffer.destroy();
+ if (loss) console.dir(loss);
+ console.warn(`GPU device lost. Reinitializing...`);
+ _NanoPowGpu.#cpuBuffer?.destroy();
+ _NanoPowGpu.#gpuBuffer?.destroy();
+ _NanoPowGpu.#uboBuffer?.destroy();
_NanoPowGpu.#busy = false;
_NanoPowGpu.init();
}
<head>
<link rel="icon" href="./favicon.ico">
<script type="module"
- src="https://zoso.dev/?p=libnemo.git;a=blob_plain;f=global.min.2.js;hb=refs/heads/ios"></script>
+ src="https://zoso.dev/?p=libnemo.git;a=blob_plain;f=global.min.js;hb=refs/heads/ios"></script>
<!-- <script type="module" src="https://cdn.jsdelivr.net/npm/nano-webgl-pow@1.1.1/nano-webgl-pow.js"></script> -->
<script type="module">
(async () => {
}
static reset (loss?: GPUDeviceLostInfo): void {
- console.dir(loss)
- console.warn(`Device lost. Reinitializing...`)
- console.dir(NanoPowGpu)
- console.dir(NanoPowGpu.#cpuBuffer)
- if (NanoPowGpu.#cpuBuffer) NanoPowGpu.#cpuBuffer.destroy()
- if (NanoPowGpu.#gpuBuffer) NanoPowGpu.#gpuBuffer.destroy()
- if (NanoPowGpu.#uboBuffer) NanoPowGpu.#uboBuffer.destroy()
+ if (loss) console.dir(loss)
+ console.warn(`GPU device lost. Reinitializing...`)
+ NanoPowGpu.#cpuBuffer?.destroy()
+ NanoPowGpu.#gpuBuffer?.destroy()
+ NanoPowGpu.#uboBuffer?.destroy()
NanoPowGpu.#busy = false
NanoPowGpu.init()
}
this.reset()
return this.search(hash, threshold)
}
-
if (data == null) throw new Error(`Failed to get data from buffer.`)
nonce = data.getBigUint64(0, true)
this.#busy = !data.getUint32(8)