GetPosition
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the logical position of TPosition where the LocalTensor is located, which can be VECIN, VECOUT, VECCALC, A1, A2, B1, B2, CO1, or CO2.
Prototype
1 | __aicore__ inline int32_t GetPosition() const |
Parameters
None
Returns
Logical position of TPosition where the LocalTensor is located.
Restrictions
None
Examples
1 2 3 4 5 6 7 8 9 | // Example AscendC::TPosition srcPos = (AscendC::TPosition)inputLocal.GetPosition(); if (srcPos == AscendC::TPosition::VECCALC) { // Processing logic 1 } else if (srcPos == AscendC::TPosition::A1) { // Processing logic 2 } else { // Processing logic 3 } |
Parent topic: LocalTensor