Files
compute-runtime/shared/source/program/sync_buffer_handler.inl
Bartosz Dunajski 692def2c79 feature: region group barrier allocation support
Related-To: NEO-11031

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
2024-06-03 18:34:54 +02:00

17 lines
487 B
C++

/*
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/memory_manager/memory_manager.h"
template <typename KernelT>
void NEO::SyncBufferHandler::prepareForEnqueue(size_t workGroupsCount, KernelT &kernel) {
auto requiredSize = alignUp(workGroupsCount, CommonConstants::maximalSizeOfAtomicType);
auto patchData = obtainAllocationAndOffset(requiredSize);
kernel.patchSyncBuffer(patchData.first, patchData.second);
}