diff --git a/README.md b/README.md index c4c2104b4..094666300 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ ## Principles * Non-vulkan naming convention to disambiguate Vulkan vs Kompute components -* BYOV: It would play nicely with existing applications with a bring-your-own-Vulkan design +* Extends the existing vulkan API with a simpler compute-specific interface +* BYOV: Play nice with existing Vulkan applications with a bring-your-own-Vulkan design * TODO ## Getting Started diff --git a/src/OpCreateTensor.cpp b/src/OpCreateTensor.cpp new file mode 100644 index 000000000..3d0583259 --- /dev/null +++ b/src/OpCreateTensor.cpp @@ -0,0 +1,18 @@ + +#include "OpCreateTensor.hpp" + +namespace kp { + +OpCreateTensor::OpCreateTensor() { + +} + +OpCreateTensor::OpCreateTensor(std::shared_ptr commandBuffer) { + this->mCommandBuffer = commandBuffer; +} + +OpCreateTensor::~OpCreateTensor() { + +} + +} diff --git a/src/OpCreateTensor.hpp b/src/OpCreateTensor.hpp new file mode 100644 index 000000000..dc3d01f86 --- /dev/null +++ b/src/OpCreateTensor.hpp @@ -0,0 +1,35 @@ +#pragma once + +#include +#include + +// SPDLOG_ACTIVE_LEVEL must be defined before spdlog.h import +#if DEBUG +#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG +#endif + +#include + +#include "BaseOp.hpp" + +namespace kp { + +class OpCreateTensor: BaseOp +{ +private: + + +public: + OpCreateTensor(); + + OpCreateTensor(std::shared_ptr commandBuffer); + + ~OpCreateTensor(); + +private: + + std::shared_ptr mCommandBuffer; +}; + +} // End namespace kp + diff --git a/src/OpMult.hpp b/src/OpMult.hpp index 3dbcff5b7..cfe1411c6 100644 --- a/src/OpMult.hpp +++ b/src/OpMult.hpp @@ -1,13 +1,13 @@ #pragma once -#import "BaseOperator.hpp" +#include "BaseOp.hpp" namespace kp { -class OpMult: BaseOperator +class OpMult: BaseOp { private: - + public: OpMult(); diff --git a/src/Sequence.cpp b/src/Sequence.cpp index fa1e66e89..aa1ed8d50 100644 --- a/src/Sequence.cpp +++ b/src/Sequence.cpp @@ -35,7 +35,7 @@ Sequence::~Sequence() { if (this->mFreeCommandBuffer) { spdlog::info("Freeing CommandBuffer"); - this->mDevice->freeCommandBuffers(*this->mCommandPool, 1, this->mCommandBuffer); + this->mDevice->freeCommandBuffers(*this->mCommandPool, 1, this->mCommandBuffer.get()); SPDLOG_DEBUG("Kompute Manager Freed CommandBuffer"); } @@ -89,7 +89,7 @@ void Sequence::eval() { } const vk::PipelineStageFlags waitStageMask = vk::PipelineStageFlagBits::eTransfer; - vk::SubmitInfo submitInfo(0, nullptr, &waitStageMask, 1, this->mCommandBuffer); + vk::SubmitInfo submitInfo(0, nullptr, &waitStageMask, 1, this->mCommandBuffer.get()); vk::Fence fence = this->mDevice->createFence(vk::FenceCreateInfo()); this->mComputeQueue->submit(1, &submitInfo, fence);