GetValue
Product Support
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Obtains the value of a specified index in the LocalTensor.
This API is supported only when the TPosition of the LocalTensor is VECIN, VECCALC, or VECOUT.
Prototype
1 | __aicore__ inline __inout_pipe__(S) PrimType GetValue(const uint32_t index) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
LocalTensor index. The unit is element. |
Returns
Value of the specified index in the LocalTensor. The value is of the PrimType type.
PrimType is defined as follows:
1 2 | // PrimT is used to extract the basic data type from T. If T is of the basic data type, the data type is directly returned. If T is of the TensorTrait type, the LiteType basic data type in TensorTrait is extracted. using PrimType = PrimT<T>; |
Restrictions
None
Example
For details, see Example.
Parent topic: LocalTensor