目录

GetAttrPointer

Function Description

Obtains the operator attribute of a specified index. The pointer to the attribute is returned.

Function Prototype

template<typename T>  const T *GetAttrPointer(size_t index) const

Parameters

Parameter Input/Output Description
T Specified output type Attribute type.
index Input Index of the attribute in the IR prototype definition.

Return Value

Pointer to the attribute.

Restrictions

None

Calling Example

#include "register/op_def_registry.h"

namespace optiling {
static ge::graphStatus TilingFunc(gert::TilingContext* context)
{
    const gert::RuntimeAttrs* runtime_attrs = context->GetAttrs();
    const gert::ContinuousVector* attr0 = runtime_attrs->GetAttrPointer<gert::ContinuousVector>(0);
    return ge::GRAPH_SUCCESS;
}
}