跳转至

ArrayAttr

Supported Products

[!NOTE]

For details about Ascend product models, see Ascend Product Models.

  • Ascend 950PR&950DT products: Not supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Not supported
  • Atlas inference products: Supported
  • Atlas training products: Not supported

[!NOTE]

For Atlas A2 products, only the Atlas 800I A2 in this series is supported. For Atlas inference products, only the Atlas 300I Duo inference card and Atlas 800 inference server (model 3000) in this series are supported.

Description

Adds an array attribute through a callback function.

Function Prototype

template <Level levelAttr = level, typename T>
Profiler &ArrayAttr(const char *attrName, const T &startIter, const T &endIter, typename ArrayCollectorHelper<Profiler<level>, T>::AttrCollectCallback callback)

Parameter Description

Table 1 Parameters

Parameter Input/Output Remarks
attrName Input Attribute name.
startIter Input Start iterator (any iterator type).
endIter Input End iterator (any iterator type).
callback Input The callback function requires two input parameters: the first is the current object for adding attributes, and the second is the current iteration for retrieving the attribute content to record.

Return Values

Returns Profiler& (a reference to the current object), allowing multiple method calls to be chained together.