Files
compute-runtime/opencl/test/unit_test/mocks/mock_mdi.h
Mateusz Jablonski 97119f5f3e Store ClDevice in DispatchInfo
Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-11-17 10:29:20 +01:00

34 lines
918 B
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "opencl/source/helpers/dispatch_info.h"
using namespace NEO;
class MockMultiDispatchInfo : public MultiDispatchInfo {
public:
using MultiDispatchInfo::dispatchInfos;
MockMultiDispatchInfo(ClDevice *clDevice, Kernel *kernel) : MultiDispatchInfo(kernel) {
DispatchInfo di(clDevice, kernel, 1, {100, 1, 1}, {10, 1, 1}, {0, 0, 0});
dispatchInfos.push_back(di);
}
MockMultiDispatchInfo(ClDevice *clDevice, std::vector<Kernel *> kernels) {
for (auto kernel : kernels) {
DispatchInfo di(clDevice, kernel, 1, {100, 1, 1}, {10, 1, 1}, {0, 0, 0});
dispatchInfos.push_back(di);
}
}
MockMultiDispatchInfo(std::vector<DispatchInfo *> dis) {
for (auto di : dis) {
dispatchInfos.push_back(*di);
}
}
};