MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / ~Context

Method ~Context

gpu.hpp:526–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524 TensorPool pool = TensorPool(this);
525 KernelPool kernelPool = KernelPool(this);
526 ~Context() {
527 LOG(kDefLog, kTrace, "Destroying context");
528 if (queue) {
529 wgpuQueueRelease(queue);
530 } else {
531 LOG(kDefLog, kWarn, "Queue is null");
532 }
533 if (device) {
534 wgpuDeviceRelease(device);
535 processEvents(instance);
536 } else {
537 LOG(kDefLog, kWarn, "Device is null");
538 }
539 if (adapter) {
540 wgpuAdapterRelease(adapter);
541 processEvents(instance);
542 } else {
543 LOG(kDefLog, kWarn, "Adapter is null");
544 }
545 if (instance) {
546 wgpuInstanceRelease(instance);
547 } else {
548 LOG(kDefLog, kWarn, "Instance is null");
549 }
550 LOG(kDefLog, kInfo, "Context destroyed");
551 }
552};
553
554/**

Callers

nothing calls this directly

Calls 2

LOGFunction · 0.85
processEventsFunction · 0.85

Tested by

no test coverage detected