Skip to content

Commit b91c14f

Browse files
Delete Device::getBuiltIns()
Change-Id: I9d1968dfb2ba4a56020fd17152119add726106e1 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
1 parent 7504536 commit b91c14f

File tree

65 files changed

+148
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+148
-154
lines changed

runtime/api/api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ cl_program CL_API_CALL clCreateProgramWithBuiltInKernels(cl_context context,
12541254
auto pDev = castToObject<Device>(*deviceList);
12551255
validateObject(pDev);
12561256

1257-
program = pDev->getBuiltIns().createBuiltInProgram(
1257+
program = pDev->getExecutionEnvironment()->getBuiltIns()->createBuiltInProgram(
12581258
*pContext,
12591259
*pDev,
12601260
kernelNames,

runtime/built_ins/built_ins.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ SchedulerKernel &BuiltIns::getSchedulerKernel(Context &context) {
6565
auto initializeSchedulerProgramAndKernel = [&] {
6666
cl_int retVal = CL_SUCCESS;
6767

68-
auto src = context.getDevice(0)->getBuiltIns().builtinsLib->getBuiltinCode(EBuiltInOps::Scheduler, BuiltinCode::ECodeType::Any, *context.getDevice(0));
68+
auto src = context.getDevice(0)->getExecutionEnvironment()->getBuiltIns()->builtinsLib->getBuiltinCode(EBuiltInOps::Scheduler, BuiltinCode::ECodeType::Any, *context.getDevice(0));
6969

7070
auto program = Program::createFromGenBinary(*context.getDevice(0)->getExecutionEnvironment(),
7171
&context,
@@ -190,11 +190,11 @@ Program *BuiltIns::createBuiltInProgram(
190190
if (pBuiltInProgram) {
191191
std::unordered_map<std::string, BuiltinDispatchInfoBuilder *> builtinsBuilders;
192192
builtinsBuilders["block_motion_estimate_intel"] =
193-
&device.getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockMotionEstimateIntel, context, device);
193+
&device.getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockMotionEstimateIntel, context, device);
194194
builtinsBuilders["block_advanced_motion_estimate_check_intel"] =
195-
&device.getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, context, device);
195+
&device.getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateCheckIntel, context, device);
196196
builtinsBuilders["block_advanced_motion_estimate_bidirectional_check_intel"] =
197-
&device.getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, context, device);
197+
&device.getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::VmeBlockAdvancedMotionEstimateBidirectionalCheckIntel, context, device);
198198
const cl_device_id clDevice = &device;
199199
errcodeRet = pBuiltInProgram->build(
200200
clDevice,

runtime/command_queue/command_queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ void CommandQueue::releaseIndirectHeap(IndirectHeap::Type heapType) {
596596

597597
void CommandQueue::dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, BuffersForAuxTranslation &buffersForAuxTranslation,
598598
AuxTranslationDirection auxTranslationDirection) {
599-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
599+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
600600
BuiltinDispatchInfoBuilder::BuiltinOpParams dispatchParams;
601601

602602
dispatchParams.buffersForAuxTranslation = &buffersForAuxTranslation;

runtime/command_queue/enqueue_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
8686
} else {
8787
BuffersForAuxTranslation buffersForAuxTranslation;
8888
if (kernel->isAuxTranslationRequired()) {
89-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
89+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::AuxTranslation, getContext(), getDevice());
9090
builtInLock.takeOwnership(builder, this->context);
9191
kernel->fillWithBuffersForAuxTranslation(buffersForAuxTranslation);
9292
dispatchAuxTranslation(multiDispatchInfo, buffersForAuxTranslation, AuxTranslationDirection::AuxToNonAux);
@@ -122,7 +122,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCount
122122

123123
template <typename GfxFamily>
124124
void CommandQueueHw<GfxFamily>::forceDispatchScheduler(OCLRT::MultiDispatchInfo &multiDispatchInfo) {
125-
BuiltIns &builtIns = getDevice().getBuiltIns();
125+
BuiltIns &builtIns = *getDevice().getExecutionEnvironment()->getBuiltIns();
126126
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(this->getContext());
127127
DispatchInfo dispatchInfo(&scheduler, 1, Vec3<size_t>(scheduler.getGws(), 1, 1), Vec3<size_t>(scheduler.getLws(), 1, 1), Vec3<size_t>(0, 0, 0));
128128

@@ -299,7 +299,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
299299
taskCount,
300300
hwTimeStamps);
301301

302-
BuiltIns &builtIns = getDevice().getBuiltIns();
302+
BuiltIns &builtIns = *getDevice().getExecutionEnvironment()->getBuiltIns();
303303
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(this->getContext());
304304

305305
scheduler.setArgs(devQueueHw->getQueueBuffer(),

runtime/command_queue/enqueue_copy_buffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBuffer(
4646

4747
MultiDispatchInfo dispatchInfo;
4848

49-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
50-
this->getContext(), this->getDevice());
49+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToBuffer,
50+
this->getContext(), this->getDevice());
5151
BuiltInOwnershipWrapper builtInLock(builder, this->context);
5252

5353
BuiltinDispatchInfoBuilder::BuiltinOpParams dc;

runtime/command_queue/enqueue_copy_buffer_rect.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferRect(
4848

4949
MultiDispatchInfo dispatchInfo;
5050

51-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
52-
this->getContext(), this->getDevice());
51+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferRect,
52+
this->getContext(), this->getDevice());
5353
BuiltInOwnershipWrapper builtInLock(builder, this->context);
5454

5555
MemObjSurface srcBufferSurf(srcBuffer);

runtime/command_queue/enqueue_copy_buffer_to_image.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyBufferToImage(
4848

4949
MultiDispatchInfo di;
5050

51-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
52-
this->getContext(), this->getDevice());
51+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyBufferToImage3d,
52+
this->getContext(), this->getDevice());
5353
BuiltInOwnershipWrapper builtInLock(builder, this->context);
5454

5555
MemObjSurface srcBufferSurf(srcBuffer);

runtime/command_queue/enqueue_copy_image.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyImage(
4848

4949
MultiDispatchInfo di;
5050

51-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
52-
this->getContext(), this->getDevice());
51+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d,
52+
this->getContext(), this->getDevice());
5353
BuiltInOwnershipWrapper builtInLock(builder, this->context);
5454

5555
MemObjSurface srcImgSurf(srcImage);

runtime/command_queue/enqueue_copy_image_to_buffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueCopyImageToBuffer(
4848

4949
MultiDispatchInfo di;
5050

51-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
52-
this->getContext(), this->getDevice());
51+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImage3dToBuffer,
52+
this->getContext(), this->getDevice());
5353
BuiltInOwnershipWrapper builtInLock(builder, this->context);
5454

5555
MemObjSurface srcImgSurf(srcImage);

runtime/command_queue/enqueue_fill_buffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueFillBuffer(
6161

6262
MultiDispatchInfo dispatchInfo;
6363

64-
auto &builder = getDevice().getBuiltIns().getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
65-
this->getContext(), this->getDevice());
64+
auto &builder = getDevice().getExecutionEnvironment()->getBuiltIns()->getBuiltinDispatchInfoBuilder(EBuiltInOps::FillBuffer,
65+
this->getContext(), this->getDevice());
6666

6767
BuiltInOwnershipWrapper builtInLock(builder, this->context);
6868

0 commit comments

Comments
 (0)