Updated init parameter to be tensor vector

This commit is contained in:
Alejandro Saucedo 2020-08-20 05:27:42 +01:00
parent 90ea083cba
commit 8aa7843f0e
7 changed files with 108 additions and 16 deletions

40
src/OpMult.hpp Normal file
View file

@ -0,0 +1,40 @@
#pragma once
#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"
#include "OpBase.hpp"
namespace kp {
class OpMult : public OpBase
{
public:
OpMult();
OpMult(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
std::shared_ptr<vk::Device> device,
std::shared_ptr<vk::CommandBuffer> commandBuffer);
~OpMult();
void init(std::vector<std::shared_ptr<Tensor>> tensors) override;
void record() override;
private:
std::shared_ptr<Tensor> mPrimaryTensor;
std::shared_ptr<Tensor> mStagingTensor;
};
} // End namespace kp