mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
style: skip redundant unique_ptr::get function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
d18e89e439
commit
943ad0e1eb
@ -1246,8 +1246,8 @@ HWTEST_TEMPLATED_F(BcsSvmTests, givenSVMMAllocationWithOffsetWhenUsingBcsThenPro
|
||||
pSrcPtr = ptrOffset(pSrcPtr, srcOffset);
|
||||
pDstPtr = ptrOffset(pDstPtr, dstOffset);
|
||||
|
||||
auto dstSvmData = bcsMockContext.get()->getSVMAllocsManager()->getSVMAlloc(pDstPtr);
|
||||
auto srcSvmData = bcsMockContext.get()->getSVMAllocsManager()->getSVMAlloc(pSrcPtr);
|
||||
auto dstSvmData = bcsMockContext->getSVMAllocsManager()->getSVMAlloc(pDstPtr);
|
||||
auto srcSvmData = bcsMockContext->getSVMAllocsManager()->getSVMAlloc(pSrcPtr);
|
||||
|
||||
auto srcGpuAllocation = srcSvmData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||
auto dstGpuAllocation = dstSvmData->gpuAllocations.getGraphicsAllocation(device->getRootDeviceIndex());
|
||||
|
@ -375,7 +375,7 @@ TEST(Buffer, givenHostPtrPassedToBufferCreateWhenMemUseHostPtrFlagisSetAndBuffer
|
||||
std::unique_ptr<Buffer> buffer(Buffer::create(&ctx, flags, MemoryConstants::pageSize, offsetedPtr, retVal));
|
||||
ASSERT_NE(nullptr, buffer.get());
|
||||
|
||||
auto mapAllocation = buffer->getMapAllocation(device.get()->getRootDeviceIndex());
|
||||
auto mapAllocation = buffer->getMapAllocation(device->getRootDeviceIndex());
|
||||
EXPECT_NE(nullptr, mapAllocation);
|
||||
EXPECT_EQ(offsetedPtr, mapAllocation->getUnderlyingBuffer());
|
||||
EXPECT_EQ(AllocationType::MAP_ALLOCATION, mapAllocation->getAllocationType());
|
||||
@ -824,7 +824,7 @@ TEST_F(CompressedBuffersCopyHostMemoryTests, givenBufferCreateWhenMemoryTransfer
|
||||
static_cast<MockMemoryManager *>(context->memoryManager)->forceCompressed = true;
|
||||
std::unique_ptr<Buffer> buffer(Buffer::create(context.get(), flags, bufferSize, hostPtr, retVal));
|
||||
EXPECT_NE(nullptr, mockCmdQ->writeMapAllocation);
|
||||
EXPECT_EQ(buffer->getMapAllocation(device.get()->getRootDeviceIndex()), mockCmdQ->writeMapAllocation);
|
||||
EXPECT_EQ(buffer->getMapAllocation(device->getRootDeviceIndex()), mockCmdQ->writeMapAllocation);
|
||||
}
|
||||
|
||||
TEST_F(CompressedBuffersCopyHostMemoryTests, givenNonCompressedBufferWhenCopyFromHostPtrIsRequiredThenDontCallWriteBuffer) {
|
||||
@ -1790,13 +1790,13 @@ HWTEST_F(BufferHwFromDeviceTests, givenMultiGraphicsAllocationWhenCreateBufferHw
|
||||
auto ptr = alignedMalloc(size, MemoryConstants::pageSize);
|
||||
MockGraphicsAllocation svmAlloc(ptr, size);
|
||||
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(device.get()->getRootDeviceIndex());
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(device->getRootDeviceIndex());
|
||||
multiGraphicsAllocation.addAllocation(&svmAlloc);
|
||||
auto buffer = std::unique_ptr<Buffer>(Buffer::createBufferHwFromDevice(device.get(), 0, 0, size, ptr, ptr, multiGraphicsAllocation, 0, true, false, false));
|
||||
|
||||
EXPECT_EQ(device.get()->getRootDeviceIndex(), 0u);
|
||||
EXPECT_EQ(device->getRootDeviceIndex(), 0u);
|
||||
EXPECT_EQ(buffer->getMultiGraphicsAllocation().getGraphicsAllocations().size(), multiGraphicsAllocation.getGraphicsAllocations().size());
|
||||
EXPECT_EQ(buffer->getMultiGraphicsAllocation().getGraphicsAllocation(device.get()->getRootDeviceIndex()), multiGraphicsAllocation.getGraphicsAllocation(device.get()->getRootDeviceIndex()));
|
||||
EXPECT_EQ(buffer->getMultiGraphicsAllocation().getGraphicsAllocation(device->getRootDeviceIndex()), multiGraphicsAllocation.getGraphicsAllocation(device->getRootDeviceIndex()));
|
||||
|
||||
alignedFree(ptr);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterBufferTests, givenBufferSetSurfaceThatM
|
||||
Buffer::setSurfaceState(device.get(), &surfaceState, false, false, size, ptr, 0, nullptr, 0, 0, false, false);
|
||||
|
||||
auto mocs = surfaceState.getMemoryObjectControlState();
|
||||
auto gmmHelper = device.get()->getGmmHelper();
|
||||
auto gmmHelper = device->getGmmHelper();
|
||||
EXPECT_EQ(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST), mocs);
|
||||
|
||||
alignedFree(ptr);
|
||||
|
Reference in New Issue
Block a user