gpu.cpp 0.1.0
 
Loading...
Searching...
No Matches
gpu::KernelPool Struct Reference

A pool of kernels to manage GPU resources. For simple use cases this is instantiated as a member in the Context struct although it's possible to have multiple resource pools of kernels in more complex scenarios. More...

#include <gpu.h>

Public Member Functions

 KernelPool (Context *ctx)
 
 ~KernelPool ()
 

Public Attributes

Contextctx
 
std::set< Kernel * > data
 

Detailed Description

A pool of kernels to manage GPU resources. For simple use cases this is instantiated as a member in the Context struct although it's possible to have multiple resource pools of kernels in more complex scenarios.

Definition at line 407 of file gpu.h.

Constructor & Destructor Documentation

◆ KernelPool()

gpu::KernelPool::KernelPool ( Context * ctx)
inline

Definition at line 408 of file gpu.h.

408: ctx(ctx), data() {}
Context * ctx
Definition gpu.h:409
std::set< Kernel * > data
Definition gpu.h:410

◆ ~KernelPool()

gpu::KernelPool::~KernelPool ( )
inline

Definition at line 411 of file gpu.h.

411 {
412 // Note : Some kernel resources such as commandBuffer are harvested by
413 // queue submission, explicitly destroying readback and callback buffers
414 // produces runtime errors.
415 data.clear();
416 }

Member Data Documentation

◆ ctx

Context* gpu::KernelPool::ctx

Definition at line 409 of file gpu.h.

◆ data

std::set<Kernel *> gpu::KernelPool::data

Definition at line 410 of file gpu.h.


The documentation for this struct was generated from the following file: