2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2021-05-17 02:51:16 +08:00
|
|
|
* Copyright (C) 2018-2021 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
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-23 05:50:57 +08:00
|
|
|
#include "opencl/source/helpers/dispatch_info.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
class MockMultiDispatchInfo : public MultiDispatchInfo {
|
|
|
|
public:
|
2019-11-30 00:34:18 +08:00
|
|
|
using MultiDispatchInfo::dispatchInfos;
|
|
|
|
|
2020-11-16 19:08:30 +08:00
|
|
|
MockMultiDispatchInfo(ClDevice *clDevice, Kernel *kernel) : MultiDispatchInfo(kernel) {
|
|
|
|
DispatchInfo di(clDevice, kernel, 1, {100, 1, 1}, {10, 1, 1}, {0, 0, 0});
|
2021-03-09 02:28:02 +08:00
|
|
|
di.setNumberOfWorkgroups({10, 1, 1});
|
|
|
|
di.setTotalNumberOfWorkgroups({10, 1, 1});
|
2017-12-21 07:45:38 +08:00
|
|
|
dispatchInfos.push_back(di);
|
|
|
|
}
|
2020-11-16 19:08:30 +08:00
|
|
|
MockMultiDispatchInfo(ClDevice *clDevice, std::vector<Kernel *> kernels) {
|
2017-12-21 07:45:38 +08:00
|
|
|
for (auto kernel : kernels) {
|
2020-11-16 19:08:30 +08:00
|
|
|
DispatchInfo di(clDevice, kernel, 1, {100, 1, 1}, {10, 1, 1}, {0, 0, 0});
|
2021-03-09 02:28:02 +08:00
|
|
|
di.setNumberOfWorkgroups({10, 1, 1});
|
|
|
|
di.setTotalNumberOfWorkgroups({10, 1, 1});
|
2017-12-21 07:45:38 +08:00
|
|
|
dispatchInfos.push_back(di);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MockMultiDispatchInfo(std::vector<DispatchInfo *> dis) {
|
|
|
|
for (auto di : dis) {
|
|
|
|
dispatchInfos.push_back(*di);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|