Use const reference instead of copying data

Change appendUnalignedFillKernel to
pass const reference instead of copy

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek 2022-09-06 14:08:37 +00:00 committed by Compute-Runtime-Automation
parent 168eb5fa1b
commit adfeebcfe4
2 changed files with 3 additions and 3 deletions

View File

@ -231,10 +231,10 @@ struct CommandListCoreFamily : CommandListImp {
ze_result_t appendUnalignedFillKernel(bool isStateless,
uint32_t unalignedSize,
AlignedAllocationData dstAllocation,
const AlignedAllocationData &dstAllocation,
const void *pattern,
Event *signalEvent,
CmdListKernelLaunchParams launchParams);
const CmdListKernelLaunchParams &launchParams);
ze_result_t prepareIndirectParams(const ze_group_count_t *threadGroupDimensions);
void updateStreamProperties(Kernel &kernel, bool isMultiOsContextCapable, bool isCooperative);

View File

@ -1463,7 +1463,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryPrefetch(const voi
}
template <GFXCORE_FAMILY gfxCoreFamily>
ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendUnalignedFillKernel(bool isStateless, uint32_t unalignedSize, AlignedAllocationData dstAllocation, const void *pattern, Event *signalEvent, CmdListKernelLaunchParams launchParams) {
ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendUnalignedFillKernel(bool isStateless, uint32_t unalignedSize, const AlignedAllocationData &dstAllocation, const void *pattern, Event *signalEvent, const CmdListKernelLaunchParams &launchParams) {
Kernel *builtinFunction = nullptr;
if (isStateless) {
builtinFunction = device->getBuiltinFunctionsLib()->getFunction(Builtin::FillBufferImmediateLeftOverStateless);