GetCurAddr

Product Support

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

Atlas inference product's Vector Core

Atlas training products

x

Function

Returns the starting address of the currently free physical location.

Prototype

1
2
template <Hardware hard>
__aicore__ inline uint32_t LocalMemAllocator<hard>::GetCurAddr() const

Parameters

None

Returns

Starting address of the currently free physical location. The value range is [0, Maximum size of the physical memory).

Restrictions

None

Example

1
2
3
LocalMemAllocator allocator;
// The default physical location is UB. Because the allocation starts from address 0, the following print result is 0.
AscendC::printf("current addr is %u\n", allocator.GetCurAddr());