mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
Reorganization directory structure [2/n]
Change-Id: I47962d17d755e80dcd9476e1ed75560f433f6115
This commit is contained in:
committed by
Jaroslaw Chodor
parent
d015d3633f
commit
e8852a68c4
46
opencl/test/unit_test/perf_tests/api/api_tests.cpp
Normal file
46
opencl/test/unit_test/perf_tests/api/api_tests.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/compiler_interface/compiler_interface.h"
|
||||
#include "opencl/source/kernel/kernel.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
|
||||
#include "cl_api_tests.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
api_fixture::api_fixture()
|
||||
: retVal(CL_SUCCESS),
|
||||
retSize(0), pContext(nullptr), pKernel(nullptr), pProgram(nullptr) {
|
||||
}
|
||||
|
||||
void api_fixture::SetUp() {
|
||||
|
||||
setReferenceTime();
|
||||
|
||||
PlatformFixture::SetUp(numPlatformDevices, platformDevices);
|
||||
DeviceFixture::SetUp();
|
||||
ASSERT_NE(nullptr, pDevice);
|
||||
|
||||
auto pDevice = pPlatform->getDevice(0);
|
||||
ASSERT_NE(nullptr, pDevice);
|
||||
|
||||
cl_device_id clDevice = pDevice;
|
||||
pContext = Context::create(nullptr, DeviceVector(&clDevice, 1), nullptr, nullptr, retVal);
|
||||
|
||||
CommandQueueHwFixture::SetUp(pDevice, pContext);
|
||||
}
|
||||
|
||||
void api_fixture::TearDown() {
|
||||
delete pKernel;
|
||||
delete pContext;
|
||||
delete pProgram;
|
||||
CommandQueueHwFixture::TearDown();
|
||||
DeviceFixture::TearDown();
|
||||
PlatformFixture::TearDown();
|
||||
}
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user