Skip to content

Commit f4ab957

Browse files
committed
addressed review comments
1 parent 738439d commit f4ab957

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

sycl/source/detail/memory_manager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,7 @@ void *MemoryManager::allocateHostMemory(SYCLMemObjI *MemObj, void *UserPtr,
280280
if (UserPtr)
281281
return UserPtr;
282282

283-
void *NewMem = MemObj->allocateHostMem();
284-
return NewMem;
283+
return MemObj->allocateHostMem();;
285284
}
286285

287286
void *MemoryManager::allocateInteropMemObject(

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ AllocaSubBufCommand::AllocaSubBufCommand(QueueImplPtr Queue, Requirement Req,
950950
std::vector<Command *> &ToCleanUp)
951951
: AllocaCommandBase(CommandType::ALLOCA_SUB_BUF, std::move(Queue),
952952
std::move(Req),
953-
/*LinkedAllocaCmd*/ nullptr),
953+
/*LinkedAllocaCmd*/ nullptr, /*IsConst*/ false),
954954
MParentAlloca(ParentAlloca) {
955955
// Node event must be created before the dependent edge
956956
// is added to this node, so this call must be before

sycl/source/detail/scheduler/commands.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class ReleaseCommand : public Command {
364364
class AllocaCommandBase : public Command {
365365
public:
366366
AllocaCommandBase(CommandType Type, QueueImplPtr Queue, Requirement Req,
367-
AllocaCommandBase *LinkedAllocaCmd, bool IsConst = false);
367+
AllocaCommandBase *LinkedAllocaCmd, bool IsConst);
368368

369369
ReleaseCommand *getReleaseCmd() { return &MReleaseCmd; }
370370

sycl/source/detail/scheduler/graph_builder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
670670
std::vector<Command *> &ToEnqueue) {
671671

672672
AllocaCommandBase *AllocaCmd =
673-
findAllocaForReq(Record, Req, Queue->getContextImplPtr(), false);
673+
findAllocaForReq(Record, Req, Queue->getContextImplPtr(), /*AllowConst=*/false);
674674

675675
if (!AllocaCmd) {
676676
std::vector<Command *> ToCleanUp;
@@ -757,7 +757,7 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
757757
: HostUnifiedMemory;
758758
if (PinnedHostMemory || HostUnifiedMemoryOnNonHostDevice) {
759759
AllocaCommandBase *LinkedAllocaCmdCand =
760-
findAllocaForReq(Record, Req, Record->MCurContext, false);
760+
findAllocaForReq(Record, Req, Record->MCurContext, /*AllowConst=*/false);
761761

762762
// Cannot setup link if candidate is linked already
763763
if (LinkedAllocaCmdCand &&

0 commit comments

Comments
 (0)