Function: get_op_type
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Obtains the type of a specified operator.
You are advised to create a thread and call this API in the new thread. Otherwise, this API call will block the main thread.
acl.prof.get_op_type delivers the same function as acl.prof.get_op_type_v2. However, the acl.prof.get_op_type_v2 API is used to obtain the length of the operator type and allocate the corresponding space. You do not need to pass arguments to specify the space required by the operator type. You are advised to use the acl.prof.get_op_type_v2 API first.
Prototype
- C Prototype
1aclError aclprofGetOpType(const void *opInfo, size_t opInfoLen, uint32_t index, char *opType, size_t opTypeLen)
- Python Function
1op_type, ret = acl.prof.get_op_type(op_info, op_info_len, index, op_type_len)
Parameter Description
|
Parameter |
Description |
|---|---|
|
op_info |
Int, specified memory address. |
|
op_info_len |
Int, length of the operator information. |
|
index |
Int, operator index. The value range is [0, Operator count – 1]. Call acl.prof.get_op_num to obtain the operator count. |
|
op_type_len |
Int, length of operator type. The value range is [1, 65]. |
Return Value Description
|
Return Value |
Description |
|---|---|
|
op_type |
Str, operator type. |
|
ret |
Int, error code.
|