KDGpu::PipelineCache¶
Module: Public API
#include <pipeline_cache.h>
Public Functions¶
| Name | |
|---|---|
| PipelineCache() | |
| ~PipelineCache() | |
| PipelineCache(PipelineCache && other) | |
| PipelineCache & | operator=(PipelineCache && other) |
| PipelineCache(const PipelineCache & ) =delete | |
| PipelineCache & | operator=(const PipelineCache & ) =delete |
| const Handle< PipelineCache_t > & | handle() const |
| bool | isValid() const |
| operator Handle< PipelineCache_t >() const | |
| std::vector< uint8_t > | getData() const Retrieves the data from the pipeline cache. |
| bool | merge(const std::vector< RequiredHandle< PipelineCache_t > > & sources) const Merges data from source pipeline caches into this cache. |
Friends¶
| Name | |
|---|---|
| class | Device |
| KDGPU_EXPORT bool | operator==(const PipelineCache & a, const PipelineCache & b) |
Detailed Description¶
1 | |
See:
Warning: The pipeline cache is externally synchronized. When creating pipelines on multiple threads with the same cache, or when calling merge() while pipelines are being created, external synchronization (e.g., a mutex) must be used to ensure thread safety.
A PipelineCache allows the result of pipeline construction to be reused between pipelines and between runs of an application. Reusing a pipeline cache can significantly reduce pipeline construction time, improving application startup and runtime performance.
Pipeline cache data can be retrieved using getData() and saved to disk, then loaded in subsequent runs using PipelineCacheOptions::initialData.
Multiple pipeline caches can be merged using merge() to consolidate cached data.
Public Functions Documentation¶
function PipelineCache¶
1 | |
function ~PipelineCache¶
1 | |
function PipelineCache¶
1 2 3 | |
function operator=¶
1 2 3 | |
function PipelineCache¶
1 2 3 | |
function operator=¶
1 2 3 | |
function handle¶
1 | |
function isValid¶
1 | |
function operator Handle< PipelineCache_t >¶
1 | |
function getData¶
1 | |
Retrieves the data from the pipeline cache.
Return: A vector containing the cached pipeline data, which can be saved and reloaded later
The returned data is opaque and implementation-specific. It should be treated as a binary blob that can be persisted to disk and loaded in subsequent runs.
function merge¶
1 2 3 | |
Merges data from source pipeline caches into this cache.
Parameters:
- sources Vector of source pipeline cache handles to merge from
Warning: This operation requires external synchronization if any of the caches (this cache or any source caches) are being used concurrently for pipeline creation.
After merging, this cache will contain the union of all pipeline data from this cache and all source caches. The source caches remain valid and unchanged.
Friends¶
friend Device¶
1 2 3 | |
friend operator==¶
1 2 3 4 5 | |
Updated on 2026-02-28 at 00:01:08 +0000