Base working compilation
This commit is contained in:
parent
5596b6f029
commit
7c3af1189f
8 changed files with 40 additions and 37 deletions
50
src/OpBase.hpp
Normal file
50
src/OpBase.hpp
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
// SPDLOG_ACTIVE_LEVEL must be defined before spdlog.h import
|
||||
#if DEBUG
|
||||
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG
|
||||
#endif
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include "Tensor.hpp"
|
||||
|
||||
namespace kp {
|
||||
|
||||
class OpBase
|
||||
{
|
||||
private:
|
||||
public:
|
||||
OpBase() {}
|
||||
|
||||
OpBase(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
|
||||
std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer) {
|
||||
SPDLOG_DEBUG("Compute OpBase constructor started");
|
||||
|
||||
this->mPhysicalDevice = physicalDevice;
|
||||
this->mDevice = device;
|
||||
this->mCommandBuffer = commandBuffer;
|
||||
}
|
||||
|
||||
~OpBase()
|
||||
{
|
||||
SPDLOG_DEBUG("Compute OpBase destructor started");
|
||||
}
|
||||
|
||||
virtual void init(std::shared_ptr<Tensor> tensor, ...) = 0;
|
||||
virtual void record() = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<vk::PhysicalDevice> mPhysicalDevice;
|
||||
std::shared_ptr<vk::Device> mDevice;
|
||||
std::shared_ptr<vk::CommandBuffer> mCommandBuffer;
|
||||
};
|
||||
|
||||
} // End namespace kp
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue