mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Pass device index to create method..
Change-Id: Iab493edf1b96a6cecf6e3dba6813824529f0c08b
This commit is contained in:

committed by
sys_ocldev

parent
d24a0accd9
commit
377b99be90
@ -248,7 +248,7 @@ TEST(Device_GetCaps, givenDeviceWithMidThreadPreemptionWhenDeviceIsCreatedThenSi
|
||||
|
||||
auto executionEnvironment = new ExecutionEnvironment();
|
||||
executionEnvironment->builtins.reset(builtIns);
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithExecutionEnvironment<MockDevice>(platformDevices[0], executionEnvironment));
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithExecutionEnvironment<MockDevice>(platformDevices[0], executionEnvironment, 0u));
|
||||
ASSERT_EQ(builtIns, device->getExecutionEnvironment()->getBuiltIns());
|
||||
EXPECT_TRUE(builtIns->getSipKernelCalled);
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ TEST(DeviceCreation, givenDeviceWhenItIsCreatedThenOsContextIsRegistredInMemoryM
|
||||
TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachOsContextHasUniqueId) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.incRefInternal();
|
||||
auto device = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment));
|
||||
auto device2 = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment));
|
||||
auto device = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment, 1u));
|
||||
|
||||
EXPECT_EQ(0u, device->getOsContext()->getContextId());
|
||||
EXPECT_EQ(1u, device2->getOsContext()->getContextId());
|
||||
@ -192,8 +192,8 @@ TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachOsContextHasUniqu
|
||||
TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachDeviceHasSeperateDeviceIndex) {
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.incRefInternal();
|
||||
auto device = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment));
|
||||
auto device2 = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment));
|
||||
auto device = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<Device>(Device::create<Device>(nullptr, &executionEnvironment, 1u));
|
||||
|
||||
EXPECT_EQ(0u, device->getDeviceIndex());
|
||||
EXPECT_EQ(1u, device2->getDeviceIndex());
|
||||
|
Reference in New Issue
Block a user