SetAddrWithOffset
Product Support
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Sets the tensor address with an offset. It is used to quickly obtain and define a tensor and specify the offset of the new tensor relative to the start address of the old tensor. The offset length is the number of elements of the old tensor.
Prototype
1 2 | template <typename S> __aicore__ inline void SetAddrWithOffset(LocalTensor<S> &src, uint32_t offset) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
src |
Input |
Base address tensor. The address of this tensor is used as the base address, and the offset is applied to obtain the new tensor address. |
offset |
Input |
Offset length, in elements. |
Returns
None
Restrictions
None
Example
For details, see Example.
Parent topic: LocalTensor