We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
ReferencesCANNModel Manager V2 APIsModel Tensor Creation ClassCreateNativeHandle

CreateNativeHandle

NOTE

This API has been deprecated since DDK 5.0.1.0. Please use the Model Manager V1 API CreateNativeHandle instead.

API Definition

Collapse
Word wrap
Dark theme
Copy code
  1. HIAI_UTIL_API_EXPORT Status CreateNativeHandle(NativeHandle& nativeHandle, const buffer_handle_t handle, int offset = -1, int size = -1);

Overview

Generates the structure information of NativeHandle based on the structure information of buffer_handle_t. TensorBuffer can be created by calling CreateNDTensorBuffer.

Parameters

Expand

Name

Type

Description

nativeHandle

NativeHandle&

Structure information of the NativeHandle output.

handle

buffer_handle_t

Structure information of the buffer_handle_t input.

offset

int

This parameter is optional. The default value is -1.

  • Value -1 indicates an invalid value. The offset value of NativeHandle is equal to the offset value of buffer_handle_t.
  • If this parameter is not set to -1, the offset value of NativeHandle is equal to the value you set here.

size

int

This parameter is optional. The default value is -1.

  • Value -1 indicates an invalid value. The size value of NativeHandle is equal to the size value of buffer_handle_t.
  • If this parameter is not set to -1, the size value of NativeHandle is equal to the value you set here.

Return

Expand

Type

Description

Status

  • SUCCESS: success.
  • Other values: failure.
Search in References
Enter a keyword.