Kompute
Loading...
Searching...
No Matches
Public Member Functions | List of all members
kp::OpMemoryBarrier Class Reference

#include <OpMemoryBarrier.hpp>

Inheritance diagram for kp::OpMemoryBarrier:
Inheritance graph
[legend]
Collaboration diagram for kp::OpMemoryBarrier:
Collaboration graph
[legend]

Public Member Functions

 OpMemoryBarrier (const std::vector< std::shared_ptr< Memory > > &memObjects, const vk::AccessFlagBits &srcAccessMask, const vk::AccessFlagBits &dstAccessMask, const vk::PipelineStageFlagBits &srcStageMask, const vk::PipelineStageFlagBits &dstStageMask, bool barrierOnPrimary=true) noexcept
 
 OpMemoryBarrier (const OpMemoryBarrier &)=delete
 Make OpMemoryBarrier non-copyable.
 
 OpMemoryBarrier (const OpMemoryBarrier &&)=delete
 
OpMemoryBarrieroperator= (const OpMemoryBarrier &)=delete
 
OpMemoryBarrieroperator= (const OpMemoryBarrier &&)=delete
 
virtual ~OpMemoryBarrier () noexcept override
 
virtual void record (const vk::CommandBuffer &commandBuffer) override
 
virtual void preEval (const vk::CommandBuffer &commandBuffer) override
 
virtual void postEval (const vk::CommandBuffer &commandBuffer) override
 
- Public Member Functions inherited from kp::OpBase
 OpBase ()=default
 Construct a new OpBase object.
 
 OpBase (const OpBase &)=delete
 Make OpBase non-copyable.
 
 OpBase (const OpBase &&)=delete
 
OpBaseoperator= (const OpBase &)=delete
 
OpBaseoperator= (const OpBase &&)=delete
 
virtual ~OpBase () noexcept
 

Detailed Description

Operation that provides a general abstraction that simplifies the use of algorithm and parameter components which can be used with shaders. It exposes the pipeline barrier functionality specifically for memory barriers that can be configured through the respective source and destination masks

Constructor & Destructor Documentation

◆ OpMemoryBarrier()

kp::OpMemoryBarrier::OpMemoryBarrier ( const std::vector< std::shared_ptr< Memory > > &  memObjects,
const vk::AccessFlagBits &  srcAccessMask,
const vk::AccessFlagBits &  dstAccessMask,
const vk::PipelineStageFlagBits &  srcStageMask,
const vk::PipelineStageFlagBits &  dstStageMask,
bool  barrierOnPrimary = true 
)
noexcept

Constructor that stores mem objects as well as memory barrier parameters to be used to create a pipeline barrier on the respective primary or staging tensor.

Parameters
memObjectsThe mem objects to apply the memory barriers on
srcAccessMaskThe kp::AccessFlagBits for the source access mask
dstAccessMaskThe kp::AccessFlagBits for the destination access mask
srcStageMaskThe kp::PipelineStageFlagBits for the source stage mask
dstStageMaskThe kp::PipelineStageFlagBits for the destination stage mask
barrierOnPrimaryBoolean to select primary or secondary buffers on mem objects

◆ ~OpMemoryBarrier()

virtual kp::OpMemoryBarrier::~OpMemoryBarrier ( )
overridevirtualnoexcept

Default destructor, which is in charge of destroying the reference to the tensors and all the relevant access / stage masks created

Member Function Documentation

◆ postEval()

virtual void kp::OpMemoryBarrier::postEval ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

Does not perform any postEval commands.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.

◆ preEval()

virtual void kp::OpMemoryBarrier::preEval ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

Does not perform any preEval commands.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.

◆ record()

virtual void kp::OpMemoryBarrier::record ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

This records the memory barrier with the access and stage masks provided across all relevant tensors.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.


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