Kompute
OpTensorSyncLocal.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 
20 class OpTensorSyncLocal : public OpBase
21 {
22  public:
30  OpTensorSyncLocal(const std::vector<std::shared_ptr<Tensor>>& tensors);
31 
36  ~OpTensorSyncLocal() override;
37 
44  void record(const vk::CommandBuffer& commandBuffer) override;
45 
51  virtual void preEval(const vk::CommandBuffer& commandBuffer) override;
52 
59  virtual void postEval(const vk::CommandBuffer& commandBuffer) override;
60 
61  private:
62  // -------------- ALWAYS OWNED RESOURCES
63  std::vector<std::shared_ptr<Tensor>> mTensors;
64 };
65 
66 } // End namespace kp
Definition: OpBase.hpp:19
Definition: OpTensorSyncLocal.hpp:21
void record(const vk::CommandBuffer &commandBuffer) override
~OpTensorSyncLocal() override
OpTensorSyncLocal(const std::vector< std::shared_ptr< Tensor >> &tensors)
virtual void postEval(const vk::CommandBuffer &commandBuffer) override
virtual void preEval(const vk::CommandBuffer &commandBuffer) override