Kompute
Public Member Functions | List of all members
kp::OpTensorCopy Class Reference

#include <OpTensorCopy.hpp>

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

Public Member Functions

 OpTensorCopy (const std::vector< std::shared_ptr< Tensor >> &tensors)
 
 ~OpTensorCopy () 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
virtual ~OpBase ()
 

Detailed Description

Operation that copies the data from the first tensor to the rest of the tensors provided, using a record command for all the vectors. This operation does not own/manage the memory of the tensors passed to it. The operation must only receive tensors of type

Constructor & Destructor Documentation

◆ OpTensorCopy()

kp::OpTensorCopy::OpTensorCopy ( const std::vector< std::shared_ptr< Tensor >> &  tensors)

Default constructor with parameters that provides the core vulkan resources and the tensors that will be used in the operation.

Parameters
tensorsTensors that will be used to create in operation.

◆ ~OpTensorCopy()

kp::OpTensorCopy::~OpTensorCopy ( )
override

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::OpTensorCopy::postEval ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

Copies the local vectors for all the tensors to sync the data with the gpu.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.

◆ preEval()

virtual void kp::OpTensorCopy::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::OpTensorCopy::record ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

Records the copy commands from the first tensor into all the other tensors provided. Also optionally records a barrier.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.


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