2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-02-22 16:28:27 +08:00
|
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
2018-09-18 15:11:08 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#pragma once
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/kernel/kernel.h"
|
|
|
|
#include "opencl/source/mem_obj/buffer.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
#include "CL/cl.h"
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "fixtures/context_fixture.h"
|
|
|
|
#include "fixtures/device_fixture.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "gtest/gtest.h"
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "mocks/mock_buffer.h"
|
|
|
|
#include "mocks/mock_context.h"
|
|
|
|
#include "mocks/mock_kernel.h"
|
|
|
|
#include "mocks/mock_program.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2018-03-29 06:38:41 +08:00
|
|
|
class KernelArgBufferFixture : public ContextFixture, public DeviceFixture {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
using ContextFixture::SetUp;
|
|
|
|
|
|
|
|
public:
|
|
|
|
KernelArgBufferFixture()
|
|
|
|
: retVal(CL_SUCCESS), pProgram(nullptr), pKernel(nullptr), pKernelInfo(nullptr) {
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2018-03-29 06:38:41 +08:00
|
|
|
void SetUp();
|
|
|
|
void TearDown();
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
cl_int retVal;
|
|
|
|
MockProgram *pProgram;
|
|
|
|
MockKernel *pKernel;
|
2018-08-16 20:28:58 +08:00
|
|
|
std::unique_ptr<KernelInfo> pKernelInfo;
|
2017-12-21 07:45:38 +08:00
|
|
|
SKernelBinaryHeaderCommon kernelHeader;
|
|
|
|
char pSshLocal[64];
|
|
|
|
char pCrossThreadData[64];
|
|
|
|
};
|