Files
compute-runtime/shared/source/helpers/per_thread_data.h
Krystian Chmielewski 69bef975f0 OCL cache per thread data
Add caching mechanism for local ids in OCL.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
2022-11-02 17:07:29 +01:00

28 lines
636 B
C++

/*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/local_id_gen.h"
#include "shared/source/utilities/arrayref.h"
#include <cstddef>
#include <cstdint>
namespace NEO {
class LinearStream;
struct PerThreadDataHelper {
static inline size_t getPerThreadDataSizeTotal(
uint32_t simd,
uint32_t grfSize,
uint32_t numChannels,
size_t localWorkSize) {
return getThreadsPerWG(simd, localWorkSize) * getPerThreadSizeLocalIDs(simd, grfSize, numChannels);
}
}; // namespace PerThreadDataHelper
} // namespace NEO