@@ -123,7 +123,7 @@ Scheduler::GraphBuilder::getOrInsertMemObjRecord(const QueueImplPtr &Queue,
123
123
MemObject->MRecord .reset (new MemObjRecord{/* MAllocaCommands*/ {},
124
124
/* MReadLeaves*/ {},
125
125
/* MWriteLeaves*/ {},
126
- Queue->get_context_impl (),
126
+ Queue->getContextImplPtr (),
127
127
/* MMemModified*/ false });
128
128
129
129
MMemObjs.push_back (MemObject);
@@ -162,7 +162,7 @@ void Scheduler::GraphBuilder::AddNodeToLeaves(MemObjRecord *Record,
162
162
UpdateHostRequirementCommand *Scheduler::GraphBuilder::insertUpdateHostReqCmd (
163
163
MemObjRecord *Record, Requirement *Req, const QueueImplPtr &Queue) {
164
164
AllocaCommandBase *AllocaCmd =
165
- findAllocaForReq (Record, Req, Queue->get_context_impl ());
165
+ findAllocaForReq (Record, Req, Queue->getContextImplPtr ());
166
166
assert (AllocaCmd && " There must be alloca for requirement!" );
167
167
UpdateHostRequirementCommand *UpdateCommand =
168
168
new UpdateHostRequirementCommand (Queue, *Req, AllocaCmd, &Req->MData );
@@ -171,7 +171,7 @@ UpdateHostRequirementCommand *Scheduler::GraphBuilder::insertUpdateHostReqCmd(
171
171
const Requirement *StoredReq = UpdateCommand->getRequirement ();
172
172
173
173
std::set<Command *> Deps =
174
- findDepsForReq (Record, Req, Queue->get_context_impl ());
174
+ findDepsForReq (Record, Req, Queue->getContextImplPtr ());
175
175
for (Command *Dep : Deps) {
176
176
UpdateCommand->addDep (DepDesc{Dep, StoredReq, AllocaCmd});
177
177
Dep->addUser (UpdateCommand);
@@ -218,7 +218,7 @@ Command *Scheduler::GraphBuilder::insertMemoryMove(MemObjRecord *Record,
218
218
throw runtime_error (" Out of host memory" );
219
219
220
220
std::set<Command *> Deps =
221
- findDepsForReq (Record, Req, Queue->get_context_impl ());
221
+ findDepsForReq (Record, Req, Queue->getContextImplPtr ());
222
222
Deps.insert (AllocaCmdDst);
223
223
// Get parent allocation of sub buffer to perform full copy of whole buffer
224
224
if (IsSuitableSubReq (Req)) {
@@ -237,7 +237,7 @@ Command *Scheduler::GraphBuilder::insertMemoryMove(MemObjRecord *Record,
237
237
// current context, need to find a parent alloca command for it (it must be
238
238
// there)
239
239
auto IsSuitableAlloca = [Record, Req](AllocaCommandBase *AllocaCmd) {
240
- bool Res = sameCtx (AllocaCmd->getQueue ()->get_context_impl (),
240
+ bool Res = sameCtx (AllocaCmd->getQueue ()->getContextImplPtr (),
241
241
Record->MCurContext ) &&
242
242
// Looking for a parent buffer alloca command
243
243
AllocaCmd->getType () == Command::CommandType::ALLOCA;
@@ -279,7 +279,7 @@ Command *Scheduler::GraphBuilder::insertMemoryMove(MemObjRecord *Record,
279
279
}
280
280
UpdateLeaves (Deps, Record, access::mode::read_write);
281
281
AddNodeToLeaves (Record, NewCmd, access::mode::read_write);
282
- Record->MCurContext = Queue->get_context_impl ();
282
+ Record->MCurContext = Queue->getContextImplPtr ();
283
283
return NewCmd;
284
284
}
285
285
@@ -298,7 +298,7 @@ Command *Scheduler::GraphBuilder::addCopyBack(Requirement *Req) {
298
298
return nullptr ;
299
299
300
300
std::set<Command *> Deps =
301
- findDepsForReq (Record, Req, HostQueue->get_context_impl ());
301
+ findDepsForReq (Record, Req, HostQueue->getContextImplPtr ());
302
302
AllocaCommandBase *SrcAllocaCmd =
303
303
findAllocaForReq (Record, Req, Record->MCurContext );
304
304
@@ -336,7 +336,7 @@ Command *Scheduler::GraphBuilder::addHostAccessor(Requirement *Req) {
336
336
AllocaCommandBase *HostAllocaCmd =
337
337
getOrCreateAllocaForReq (Record, Req, HostQueue);
338
338
339
- if (!sameCtx (HostAllocaCmd->getQueue ()->get_context_impl (),
339
+ if (!sameCtx (HostAllocaCmd->getQueue ()->getContextImplPtr (),
340
340
Record->MCurContext ))
341
341
insertMemoryMove (Record, Req, HostQueue);
342
342
@@ -418,7 +418,7 @@ Scheduler::GraphBuilder::findDepsForReq(MemObjRecord *Record, Requirement *Req,
418
418
// Going through copying memory between contexts is not supported.
419
419
if (Dep.MDepCommand )
420
420
CanBypassDep &=
421
- sameCtx (Context, Dep.MDepCommand ->getQueue ()->get_context_impl ());
421
+ sameCtx (Context, Dep.MDepCommand ->getQueue ()->getContextImplPtr ());
422
422
423
423
if (!CanBypassDep) {
424
424
RetDeps.insert (DepCmd);
@@ -441,7 +441,7 @@ Scheduler::GraphBuilder::findDepsForReq(MemObjRecord *Record, Requirement *Req,
441
441
AllocaCommandBase *Scheduler::GraphBuilder::findAllocaForReq (
442
442
MemObjRecord *Record, Requirement *Req, const ContextImplPtr &Context) {
443
443
auto IsSuitableAlloca = [&Context, Req](AllocaCommandBase *AllocaCmd) {
444
- bool Res = sameCtx (AllocaCmd->getQueue ()->get_context_impl (), Context);
444
+ bool Res = sameCtx (AllocaCmd->getQueue ()->getContextImplPtr (), Context);
445
445
if (IsSuitableSubReq (Req)) {
446
446
const Requirement *TmpReq = AllocaCmd->getRequirement ();
447
447
Res &= TmpReq->MOffsetInBytes == Req->MOffsetInBytes ;
@@ -462,7 +462,7 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
462
462
MemObjRecord *Record, Requirement *Req, QueueImplPtr Queue) {
463
463
464
464
AllocaCommandBase *AllocaCmd =
465
- findAllocaForReq (Record, Req, Queue->get_context_impl ());
465
+ findAllocaForReq (Record, Req, Queue->getContextImplPtr ());
466
466
467
467
if (!AllocaCmd) {
468
468
if (IsSuitableSubReq (Req)) {
@@ -477,7 +477,7 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
477
477
auto *ParentAlloca =
478
478
getOrCreateAllocaForReq (Record, &ParentRequirement, Queue);
479
479
AllocaCmd = new AllocaSubBufCommand (Queue, *Req, ParentAlloca);
480
- UpdateLeaves (findDepsForReq (Record, Req, Queue->get_context_impl ()),
480
+ UpdateLeaves (findDepsForReq (Record, Req, Queue->getContextImplPtr ()),
481
481
Record, access::mode::read_write);
482
482
} else {
483
483
@@ -530,7 +530,7 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
530
530
AllocaCmd->MIsActive = false ;
531
531
} else {
532
532
LinkedAllocaCmd->MIsActive = false ;
533
- Record->MCurContext = Queue->get_context_impl ();
533
+ Record->MCurContext = Queue->getContextImplPtr ();
534
534
}
535
535
}
536
536
}
@@ -576,7 +576,7 @@ Scheduler::GraphBuilder::addCG(std::unique_ptr<detail::CG> CommandGroup,
576
576
AllocaCommandBase *AllocaCmd = getOrCreateAllocaForReq (Record, Req, Queue);
577
577
// If there is alloca command we need to check if the latest memory is in
578
578
// required context.
579
- if (!sameCtx (Queue->get_context_impl (), Record->MCurContext )) {
579
+ if (!sameCtx (Queue->getContextImplPtr (), Record->MCurContext )) {
580
580
// Cannot directly copy memory from OpenCL device to OpenCL device -
581
581
// create two copies: device->host and host->device.
582
582
if (!Queue->is_host () && !Record->MCurContext ->is_host ())
@@ -585,7 +585,7 @@ Scheduler::GraphBuilder::addCG(std::unique_ptr<detail::CG> CommandGroup,
585
585
insertMemoryMove (Record, Req, Queue);
586
586
}
587
587
std::set<Command *> Deps =
588
- findDepsForReq (Record, Req, Queue->get_context_impl ());
588
+ findDepsForReq (Record, Req, Queue->getContextImplPtr ());
589
589
590
590
for (Command *Dep : Deps)
591
591
NewCmd->addDep (DepDesc{Dep, Req, AllocaCmd});
0 commit comments