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

#include <OpSyncDevice.hpp>

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

Public Member Functions

 OpSyncDevice (const std::vector< std::shared_ptr< Memory > > &memObjects)
 
 OpSyncDevice (const OpSyncDevice &)=delete
 Make OpSyncDevice non-copyable.
 
 OpSyncDevice (const OpSyncDevice &&)=delete
 
OpSyncDeviceoperator= (const OpSyncDevice &)=delete
 
OpSyncDeviceoperator= (const OpSyncDevice &&)=delete
 
 ~OpSyncDevice () noexcept override
 
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 syncs mem object's device memory by mapping local data into the device memory. For MemoryTypes::eDevice it will use a record operation for the memory to be syncd into GPU memory which means that the operation will be done in sync with GPU commands. For MemoryTypes::eHost it will only map the data into host memory which will happen during preEval before the recorded commands are dispatched.

Constructor & Destructor Documentation

◆ OpSyncDevice()

kp::OpSyncDevice::OpSyncDevice ( const std::vector< std::shared_ptr< Memory > > &  memObjects)

Default constructor with parameters that provides the core vulkan resources and the memory objects that will be used in the operation. The memory objects provided cannot be of type MemoryTypes::eStorage.

Parameters
memObjectsMemory objects that will be used to create in operation.

◆ ~OpSyncDevice()

kp::OpSyncDevice::~OpSyncDevice ( )
overridenoexcept

Default destructor. This class does not manage memory so it won't be expecting the parent to perform a release.

Member Function Documentation

◆ postEval()

virtual void kp::OpSyncDevice::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::OpSyncDevice::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()

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

For device memory objects, it records the copy command for the memory object to copy the data from its staging to device memory.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.


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