GetAttrPointer

Description

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

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.

Returns

Pointer to the attribute.

Restrictions

None

Example

const RuntimeAttrs * runtime_attrs = kernel_context->GetAttrs();
const gert::ContinuousVector attr0 = runtime_attrs->GetAttrPointer<gert::ContinuousVector>(0);