Skip to content

Commit 921ccb0

Browse files
switch to unique_ptr.
1 parent c83d578 commit 921ccb0

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

include/API/Device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Device {
8484

8585
virtual Queue &getGraphicsQueue() = 0;
8686

87-
virtual llvm::Expected<std::shared_ptr<Fence>>
87+
virtual llvm::Expected<std::unique_ptr<Fence>>
8888
createFence(llvm::StringRef Name) = 0;
8989

9090
virtual llvm::Expected<std::shared_ptr<Buffer>>

lib/API/DX/Device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class DXDevice : public offloadtest::Device {
417417

418418
Queue &getGraphicsQueue() override { return GraphicsQueue; }
419419

420-
llvm::Expected<std::shared_ptr<offloadtest::Fence>>
420+
llvm::Expected<std::unique_ptr<offloadtest::Fence>>
421421
createFence(llvm::StringRef Name) override {
422422
ComPtr<ID3D12Fence> Fence;
423423
if (auto Err = HR::toError(

lib/API/MTL/MTLDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ class MTLDevice : public offloadtest::Device {
598598

599599
Queue &getGraphicsQueue() override { return GraphicsQueue; }
600600

601-
llvm::Expected<std::shared_ptr<offloadtest::Fence>>
601+
llvm::Expected<std::unique_ptr<offloadtest::Fence>>
602602
createFence(llvm::StringRef Name) override {
603603
MTL::SharedEvent *Event = Device->newSharedEvent();
604604
if (!Event)

lib/API/VK/Device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ class VulkanDevice : public offloadtest::Device {
530530
VkPipelineCache PipelineCache = VK_NULL_HANDLE;
531531
VkPipeline Pipeline = VK_NULL_HANDLE;
532532

533-
std::shared_ptr<Fence> Fence;
533+
std::unique_ptr<Fence> Fence;
534534

535535
// FrameBuffer associated data for offscreen rendering.
536536
VkFramebuffer FrameBuffer = VK_NULL_HANDLE;
@@ -694,7 +694,7 @@ class VulkanDevice : public offloadtest::Device {
694694

695695
Queue &getGraphicsQueue() override { return GraphicsQueue; }
696696

697-
llvm::Expected<std::shared_ptr<offloadtest::Fence>>
697+
llvm::Expected<std::unique_ptr<offloadtest::Fence>>
698698
createFence(llvm::StringRef Name) override {
699699
VkSemaphoreTypeCreateInfo TypeCreateInfo = {};
700700
TypeCreateInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO;

0 commit comments

Comments
 (0)