mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Fix typo for DeviceBitfield
Change-Id: I21718950f3d1b17ad507af76762153aefb090615 Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
@ -16,9 +16,9 @@
|
||||
using namespace OCLRT;
|
||||
|
||||
HardwareContextController::HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t engineIndex, uint32_t flags) {
|
||||
constexpr uint32_t maxIndex = std::numeric_limits<decltype(osContext.getDeviceBitfiled())>::digits;
|
||||
constexpr uint32_t maxIndex = std::numeric_limits<decltype(osContext.getDeviceBitfield())>::digits;
|
||||
for (uint32_t deviceIndex = 0; deviceIndex < maxIndex; deviceIndex++) {
|
||||
if (isBitSet(osContext.getDeviceBitfiled(), deviceIndex)) {
|
||||
if (isBitSet(osContext.getDeviceBitfield(), deviceIndex)) {
|
||||
hardwareContexts.emplace_back(aubManager.createHardwareContext(deviceIndex, engineIndex, flags));
|
||||
}
|
||||
}
|
||||
|
@ -25,13 +25,13 @@ class OsContext : public ReferenceTrackedObject<OsContext> {
|
||||
static OsContext *create(OSInterface *osInterface, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode);
|
||||
uint32_t getContextId() const { return contextId; }
|
||||
uint32_t getNumSupportedDevices() const { return numSupportedDevices; }
|
||||
uint8_t getDeviceBitfiled() const { return deviceBitfiled; }
|
||||
uint8_t getDeviceBitfield() const { return deviceBitfield; }
|
||||
PreemptionMode getPreemptionMode() const { return preemptionMode; }
|
||||
EngineInstanceT &getEngineType() { return engineType; }
|
||||
|
||||
protected:
|
||||
OsContext(uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode)
|
||||
: contextId(contextId), deviceBitfiled(deviceBitfiled), preemptionMode(preemptionMode), engineType(engineType) {
|
||||
: contextId(contextId), deviceBitfield(deviceBitfiled), preemptionMode(preemptionMode), engineType(engineType) {
|
||||
constexpr uint32_t maxIndex = std::numeric_limits<decltype(deviceBitfiled)>::digits;
|
||||
for (uint32_t deviceIndex = 0; deviceIndex < maxIndex; deviceIndex++) {
|
||||
if (isBitSet(deviceBitfiled, deviceIndex)) {
|
||||
@ -41,7 +41,7 @@ class OsContext : public ReferenceTrackedObject<OsContext> {
|
||||
};
|
||||
|
||||
const uint32_t contextId;
|
||||
const uint32_t deviceBitfiled;
|
||||
const uint32_t deviceBitfield;
|
||||
const PreemptionMode preemptionMode;
|
||||
uint32_t numSupportedDevices = 0;
|
||||
EngineInstanceT engineType = {EngineType::ENGINE_RCS, 0};
|
||||
|
@ -167,9 +167,9 @@ TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachOsContextHasUniqu
|
||||
|
||||
for (uint32_t i = 0; i < numGpgpuEngines; i++) {
|
||||
EXPECT_EQ(i, device1->getEngine(i).osContext->getContextId());
|
||||
EXPECT_EQ(1u, device1->getEngine(i).osContext->getDeviceBitfiled());
|
||||
EXPECT_EQ(1u, device1->getEngine(i).osContext->getDeviceBitfield());
|
||||
EXPECT_EQ(i + numGpgpuEngines, device2->getEngine(i).osContext->getContextId());
|
||||
EXPECT_EQ(2u, device2->getEngine(i).osContext->getDeviceBitfiled());
|
||||
EXPECT_EQ(2u, device2->getEngine(i).osContext->getDeviceBitfield());
|
||||
|
||||
EXPECT_EQ(registeredEngines[i].commandStreamReceiver,
|
||||
device1->getEngine(i).commandStreamReceiver);
|
||||
|
@ -1559,7 +1559,7 @@ TEST(ResidencyDataTest, givenDeviceBitfieldWhenCreatingOsContextThenSetValidValu
|
||||
memoryManager.createAndRegisterOsContext(nullptr, HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0],
|
||||
deviceBitfield, preemptionMode);
|
||||
EXPECT_EQ(2u, memoryManager.registeredEngines[0].osContext->getNumSupportedDevices());
|
||||
EXPECT_EQ(deviceBitfield, memoryManager.registeredEngines[0].osContext->getDeviceBitfiled());
|
||||
EXPECT_EQ(deviceBitfield, memoryManager.registeredEngines[0].osContext->getDeviceBitfield());
|
||||
EXPECT_EQ(preemptionMode, memoryManager.registeredEngines[0].osContext->getPreemptionMode());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user