Files
compute-runtime/unit_tests/helpers/hw_info_helper.h
Woloszyn, Wojciech 9a89426ec1 Refactor unit tests
- refactor image fixture
- add hwInfo fixture
- add missing case to mockGmm

Change-Id: I5f0886b8bd8f36938e1eedc5a0a63fe01248fcad
Signed-off-by: Woloszyn, Wojciech <wojciech.woloszyn@intel.com>
2018-11-27 13:54:53 +01:00

32 lines
950 B
C++

/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/hw_info.h"
#include "runtime/helpers/options.h"
using namespace OCLRT;
struct HwInfoHelper {
HwInfoHelper() {
memcpy(&testPlatform, platformDevices[0]->pPlatform, sizeof(testPlatform));
memcpy(&testFtrTable, platformDevices[0]->pSkuTable, sizeof(testFtrTable));
memcpy(&testWaTable, platformDevices[0]->pWaTable, sizeof(testWaTable));
memcpy(&testSysInfo, platformDevices[0]->pSysInfo, sizeof(testSysInfo));
hwInfo.capabilityTable = platformDevices[0]->capabilityTable;
hwInfo.pPlatform = &testPlatform;
hwInfo.pSkuTable = &testFtrTable;
hwInfo.pSysInfo = &testSysInfo;
hwInfo.pWaTable = &testWaTable;
}
PLATFORM testPlatform;
FeatureTable testFtrTable;
WorkaroundTable testWaTable;
GT_SYSTEM_INFO testSysInfo;
HardwareInfo hwInfo;
};