2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2023-01-16 15:30:27 +00:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2020-10-07 15:09:42 +02:00
|
|
|
#include "shared/source/helpers/local_id_gen.h"
|
2020-02-22 22:50:57 +01:00
|
|
|
|
2019-02-27 11:39:32 +01:00
|
|
|
#include <cstddef>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
class LinearStream;
|
|
|
|
|
|
|
|
|
|
struct PerThreadDataHelper {
|
|
|
|
|
static inline size_t getPerThreadDataSizeTotal(
|
|
|
|
|
uint32_t simd,
|
2019-12-17 08:55:09 +01:00
|
|
|
uint32_t grfSize,
|
2017-12-21 00:45:38 +01:00
|
|
|
uint32_t numChannels,
|
|
|
|
|
size_t localWorkSize) {
|
2022-10-21 14:16:43 +00:00
|
|
|
return getThreadsPerWG(simd, localWorkSize) * getPerThreadSizeLocalIDs(simd, grfSize, numChannels);
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
2022-10-21 14:16:43 +00:00
|
|
|
}; // namespace PerThreadDataHelper
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|