Skip to content

Commit 940ce32

Browse files
authored
Merge branch 'KomputeProject:master' into master
2 parents d92d03e + 292359e commit 940ce32

20 files changed

+161
-21
lines changed

src/Algorithm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace kp {
88

9-
Algorithm::~Algorithm()
9+
Algorithm::~Algorithm() noexcept
1010
{
1111
KP_LOG_DEBUG("Kompute Algorithm Destructor started");
1212

src/OpAlgoDispatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace kp {
66

7-
OpAlgoDispatch::~OpAlgoDispatch()
7+
OpAlgoDispatch::~OpAlgoDispatch() noexcept
88
{
99
KP_LOG_DEBUG("Kompute OpAlgoDispatch destructor started");
1010

src/OpCopy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OpCopy::OpCopy(const std::vector<std::shared_ptr<Memory>>& memObjects)
1818
this->mMemObjects = memObjects;
1919
}
2020

21-
OpCopy::~OpCopy()
21+
OpCopy::~OpCopy() noexcept
2222
{
2323
KP_LOG_DEBUG("Kompute OpCopy destructor started");
2424
}

src/OpMemoryBarrier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OpMemoryBarrier::OpMemoryBarrier(
1010
const vk::AccessFlagBits& dstAccessMask,
1111
const vk::PipelineStageFlagBits& srcStageMask,
1212
const vk::PipelineStageFlagBits& dstStageMask,
13-
bool barrierOnPrimary)
13+
bool barrierOnPrimary) noexcept
1414
: mSrcAccessMask(srcAccessMask)
1515
, mDstAccessMask(dstAccessMask)
1616
, mSrcStageMask(srcStageMask)
@@ -21,7 +21,7 @@ OpMemoryBarrier::OpMemoryBarrier(
2121
KP_LOG_DEBUG("Kompute OpMemoryBarrier constructor");
2222
}
2323

24-
OpMemoryBarrier::~OpMemoryBarrier()
24+
OpMemoryBarrier::~OpMemoryBarrier() noexcept
2525
{
2626
KP_LOG_DEBUG("Kompute OpMemoryBarrier destructor started");
2727
}

src/OpSyncDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ OpSyncDevice::OpSyncDevice(
1717
this->mMemObjects = memObjects;
1818
}
1919

20-
OpSyncDevice::~OpSyncDevice()
20+
OpSyncDevice::~OpSyncDevice() noexcept
2121
{
2222
KP_LOG_DEBUG("Kompute OpSyncDevice destructor started");
2323

src/OpSyncLocal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OpSyncLocal::OpSyncLocal(const std::vector<std::shared_ptr<Memory>>& memObjects)
1818
this->mMemObjects = memObjects;
1919
}
2020

21-
OpSyncLocal::~OpSyncLocal()
21+
OpSyncLocal::~OpSyncLocal() noexcept
2222
{
2323
KP_LOG_DEBUG("Kompute OpSyncLocal destructor started");
2424
}

src/Sequence.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Sequence::Sequence(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
88
std::shared_ptr<vk::Device> device,
99
std::shared_ptr<vk::Queue> computeQueue,
1010
uint32_t queueIndex,
11-
uint32_t totalTimestamps)
11+
uint32_t totalTimestamps) noexcept
1212
{
1313
KP_LOG_DEBUG("Kompute Sequence Constructor with existing device & queue");
1414

@@ -25,7 +25,7 @@ Sequence::Sequence(std::shared_ptr<vk::PhysicalDevice> physicalDevice,
2525
1); //+1 for the first one
2626
}
2727

28-
Sequence::~Sequence()
28+
Sequence::~Sequence() noexcept
2929
{
3030
KP_LOG_DEBUG("Kompute Sequence Destructor started");
3131

src/include/kompute/Algorithm.hpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Algorithm
4040
const std::vector<uint32_t>& spirv = {},
4141
const Workgroup& workgroup = {},
4242
const std::vector<S>& specializationConstants = {},
43-
const std::vector<P>& pushConstants = {})
43+
const std::vector<P>& pushConstants = {}) noexcept
4444
{
4545
KP_LOG_DEBUG("Kompute Algorithm Constructor with device");
4646

@@ -136,11 +136,21 @@ class Algorithm
136136
this->createPipeline();
137137
}
138138

139+
/**
140+
* @brief Make Algorithm uncopyable
141+
*
142+
*/
143+
Algorithm(const Algorithm&) = delete;
144+
Algorithm(const Algorithm&&) = delete;
145+
Algorithm& operator=(const Algorithm&) = delete;
146+
Algorithm& operator=(const Algorithm&&) = delete;
147+
148+
139149
/**
140150
* Destructor for Algorithm which is responsible for freeing and desroying
141151
* respective pipelines and owned parameter groups.
142152
*/
143-
~Algorithm();
153+
~Algorithm() noexcept;
144154

145155
/**
146156
* Records the dispatch function with the provided template parameters or

src/include/kompute/Image.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ class Image : public Memory
164164
{
165165
}
166166

167+
168+
/**
169+
* @brief Make Image uncopyable
170+
*
171+
*/
172+
Image(const Image&) = delete;
173+
Image(const Image&&) = delete;
174+
Image& operator=(const Image&) = delete;
175+
Image& operator=(const Image&&) = delete;
176+
167177
/**
168178
* Destructor which is in charge of freeing vulkan resources unless they
169179
* have been provided externally.

src/include/kompute/Manager.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ class Manager
5050
std::shared_ptr<vk::PhysicalDevice> physicalDevice,
5151
std::shared_ptr<vk::Device> device);
5252

53+
54+
/**
55+
* @brief Make Manager uncopyable
56+
*
57+
*/
58+
Manager(const Manager&) = delete;
59+
Manager(const Manager&&) = delete;
60+
Manager& operator=(const Manager&) = delete;
61+
Manager& operator=(const Manager&&) = delete;
62+
5363
/**
5464
* Manager destructor which would ensure all owned resources are destroyed
5565
* unless explicitly stated that resources should not be destroyed or freed.

0 commit comments

Comments
 (0)