Kompute
Loading...
Searching...
No Matches
OpSyncDevice.hpp
1// SPDX-License-Identifier: Apache-2.0
2#pragma once
3
4#include "kompute/Core.hpp"
5#include "kompute/Tensor.hpp"
6#include "kompute/operations/OpBase.hpp"
7
8namespace kp {
9
18class OpSyncDevice : public OpBase
19{
20 public:
29 OpSyncDevice(const std::vector<std::shared_ptr<Memory>>& memObjects);
30
35 OpSyncDevice(const OpSyncDevice&) = delete;
36 OpSyncDevice(const OpSyncDevice&&) = delete;
37 OpSyncDevice& operator=(const OpSyncDevice&) = delete;
38 OpSyncDevice& operator=(const OpSyncDevice&&) = delete;
39
40
45 ~OpSyncDevice() noexcept override;
46
53 void record(const vk::CommandBuffer& commandBuffer) override;
54
60 virtual void preEval(const vk::CommandBuffer& commandBuffer) override;
61
67 virtual void postEval(const vk::CommandBuffer& commandBuffer) override;
68
69 private:
70 // -------------- ALWAYS OWNED RESOURCES
71 std::vector<std::shared_ptr<Memory>> mMemObjects;
72};
73
74} // End namespace kp
Definition Memory.hpp:16
Definition OpBase.hpp:20
Definition OpSyncDevice.hpp:19
virtual void preEval(const vk::CommandBuffer &commandBuffer) override
OpSyncDevice(const OpSyncDevice &)=delete
Make OpSyncDevice non-copyable.
OpSyncDevice(const std::vector< std::shared_ptr< Memory > > &memObjects)
virtual void postEval(const vk::CommandBuffer &commandBuffer) override
void record(const vk::CommandBuffer &commandBuffer) override
~OpSyncDevice() noexcept override