operator[]
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Returns a new GlobalTensor based on the input offset.
Prototype
1 | __aicore__ inline GlobalTensor operator[](const uint64_t offset) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
offset |
Input |
Number of elements to offset. |
Returns
Returns a GlobalTensor with the specified offset.
Restrictions
None
Examples
1 2 3 4 5 | // Usage of operator[]. aGlobal[4] is a new tensor with an offset of 4 starting from the start address. auto gmA = aGlobal[4]; // The result is as follows: // Input data (aGlobal): [1 2 3 4 5 6 ... 100] // Output data (gmA): [5 6 7 8 ... 100] |
Parent topic: GlobalTensor