2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2022-07-24 12:21:16 +08:00
|
|
|
* Copyright (C) 2018-2022 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-10-07 21:09:42 +08:00
|
|
|
#include "shared/source/helpers/local_id_gen.h"
|
2022-10-21 22:16:43 +08:00
|
|
|
#include "shared/source/utilities/arrayref.h"
|
2020-02-23 05:50:57 +08:00
|
|
|
|
2019-02-27 18:39:32 +08:00
|
|
|
#include <cstddef>
|
|
|
|
#include <cstdint>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
class LinearStream;
|
|
|
|
|
|
|
|
struct PerThreadDataHelper {
|
|
|
|
static inline size_t getPerThreadDataSizeTotal(
|
|
|
|
uint32_t simd,
|
2019-12-17 15:55:09 +08:00
|
|
|
uint32_t grfSize,
|
2017-12-21 07:45:38 +08:00
|
|
|
uint32_t numChannels,
|
|
|
|
size_t localWorkSize) {
|
2022-10-21 22:16:43 +08:00
|
|
|
return getThreadsPerWG(simd, localWorkSize) * getPerThreadSizeLocalIDs(simd, grfSize, numChannels);
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
2022-10-21 22:16:43 +08:00
|
|
|
}; // namespace PerThreadDataHelper
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|