Kompute
OpTensorCopy.hpp
1 // SPDX-License-Identifier: Apache-2.0
2 #pragma once
3 
4 #include "kompute/Core.hpp"
5 
6 #include "kompute/Tensor.hpp"
7 
8 #include "kompute/operations/OpBase.hpp"
9 
10 namespace kp {
11 
18 class OpTensorCopy : public OpBase
19 {
20  public:
27  OpTensorCopy(const std::vector<std::shared_ptr<Tensor>>& tensors);
28 
33  ~OpTensorCopy() override;
34 
41  void record(const vk::CommandBuffer& commandBuffer) override;
42 
48  virtual void preEval(const vk::CommandBuffer& commandBuffer) override;
49 
56  virtual void postEval(const vk::CommandBuffer& commandBuffer) override;
57 
58  private:
59  // -------------- ALWAYS OWNED RESOURCES
60  std::vector<std::shared_ptr<Tensor>> mTensors;
61 };
62 
63 } // End namespace kp
Definition: OpBase.hpp:19
Definition: OpTensorCopy.hpp:19
OpTensorCopy(const std::vector< std::shared_ptr< Tensor >> &tensors)
virtual void postEval(const vk::CommandBuffer &commandBuffer) override
void record(const vk::CommandBuffer &commandBuffer) override
~OpTensorCopy() override
virtual void preEval(const vk::CommandBuffer &commandBuffer) override