mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
encodeMulRegVal() makes extensive use of encodeAluAdd(). The following problems are addressed: * encodeAluAdd() performs an addition and saves the calculated result to the first register. Saving the result to the first register clears the calculated result. * An array of MI_MATH buffers is setup prior to performing a series of encodeAluAdd()'s where the same registers are reused for the calculations. For calculated results to be carried over from one encodeAluAdd() operation to subsequent encodeAluAdd() operations, the MI_MATH buffer needs to be setup per encodeAluAdd(). Create EncodeMath<Family>::addition() to reserve a MI_MATH buffer and performs the addition by calling encodeAluAdd(). Modify encodeAluAdd() to save calculated result to a third register. Then, after EncodeMath<Family>::addition() is called in encodeMulRegVal(), copy the calculated result from the result register to the first register from the EncodeMath<Family>::addition() operation. This will allow the calculated value to be carried over to subsequent addition operations. Change-Id: I9c6f8362a1ca2f7e3361aaa48d8748dd6ff0f4c8 Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/command_container/command_encoder.h"
|
|
#include "shared/source/command_container/command_encoder.inl"
|
|
#include "shared/source/command_container/command_encoder_base.inl"
|
|
#include "shared/source/gen11/hw_cmds_base.h"
|
|
|
|
#include "opencl/source/gen11/reg_configs.h"
|
|
namespace NEO {
|
|
|
|
using Family = ICLFamily;
|
|
|
|
template struct EncodeDispatchKernel<Family>;
|
|
template struct EncodeStates<Family>;
|
|
template struct EncodeMath<Family>;
|
|
template struct EncodeMathMMIO<Family>;
|
|
template struct EncodeIndirectParams<Family>;
|
|
template struct EncodeSetMMIO<Family>;
|
|
template struct EncodeL3State<Family>;
|
|
template struct EncodeMediaInterfaceDescriptorLoad<Family>;
|
|
template struct EncodeStateBaseAddress<Family>;
|
|
template struct EncodeStoreMMIO<Family>;
|
|
template struct EncodeSurfaceState<Family>;
|
|
template struct EncodeAtomic<Family>;
|
|
template struct EncodeSempahore<Family>;
|
|
template struct EncodeBatchBufferStartOrEnd<Family>;
|
|
template struct EncodeMiFlushDW<Family>;
|
|
} // namespace NEO
|