11#ifdef CORRELATION_USE_VULKAN
12#include <vulkan/vulkan.h>
21#ifdef CORRELATION_USE_VULKAN
23enum class ComputeKernelType : uint8_t {
34class VulkanComputePipelineManager {
36 static constexpr size_t KERNEL_COUNT = 8;
38 VulkanComputePipelineManager() =
default;
39 ~VulkanComputePipelineManager() noexcept { cleanup(); }
41 VulkanComputePipelineManager(
const VulkanComputePipelineManager &) =
delete;
42 VulkanComputePipelineManager &operator=(
const VulkanComputePipelineManager &) =
delete;
43 VulkanComputePipelineManager(VulkanComputePipelineManager &&) noexcept = default;
44 VulkanComputePipelineManager &operator=(VulkanComputePipelineManager &&) noexcept = default;
46 [[nodiscard]]
bool initialize(VkDevice device);
47 void cleanup() noexcept;
49 [[nodiscard]] VkPipeline pipeline(ComputeKernelType type) const noexcept;
50 [[nodiscard]] VkPipelineLayout pipelineLayout(ComputeKernelType type) const noexcept;
51 [[nodiscard]] VkDescriptorSetLayout descriptorSetLayout(ComputeKernelType type) const noexcept;
54 [[nodiscard]]
bool createComputePipeline(ComputeKernelType type, std::span<const uint32_t> spirv,
55 uint32_t push_constant_size,
56 uint32_t num_storage_buffers);
58 VkDevice device_{VK_NULL_HANDLE};
59 std::array<VkDescriptorSetLayout, KERNEL_COUNT> descriptor_layouts_{};
60 std::array<VkPipelineLayout, KERNEL_COUNT> pipeline_layouts_{};
61 std::array<VkPipeline, KERNEL_COUNT> pipelines_{};
62 bool initialized_{
false};
@ LocalEntropy
Local Entropic Fingerprint (s_i / k_B).
Definition PhaseSearchTypes.hpp:30
Definition VulkanComputeService.hpp:24