File RuntimeList.h

Parent directory (DlSystem)

Definition (DlSystem/RuntimeList.h)

Includes

Full File Listing

Typedefs

typedef void *Snpe_RuntimeList_Handle_t

A typedef to indicate a SNPE RuntimeList handle

Functions

Snpe_RuntimeList_Handle_t Snpe_RuntimeList_Create()

Creates a new runtime list

Snpe_RuntimeList_Handle_t Snpe_RuntimeList_CreateCopy(Snpe_RuntimeList_Handle_t runtimeListHandle)

Copy-Constructs a RuntimeList and returns a handle to it

Parameters

runtimeListHandle – the other RuntimeList to copy

Returns

the handle to the created RuntimeList

Snpe_ErrorCode_t Snpe_RuntimeList_Delete(Snpe_RuntimeList_Handle_t runtimeListHandle)

Destroys the RuntimeList.

Parameters

runtimeListHandle[in] : Handle needed to access the runtimeList

Returns

Error code. Returns SNPE_SUCCESS if destruction successful

Snpe_ErrorCode_t Snpe_RuntimeList_Assign(Snpe_RuntimeList_Handle_t src, Snpe_RuntimeList_Handle_t dst)

Copy-assigns the contents of srcHandle into dstHandle

Parameters
  • src – Source RuntimeList handle

  • dst – Destination RuntimeList handle

Returns

SNPE_SUCCESS on successful copy-assignment

Snpe_Runtime_t Snpe_RuntimeList_GetRuntime(Snpe_RuntimeList_Handle_t runtimeListHandle, int index)

Returns the Runtime from list at position index.

Parameters
  • runtimeListHandle[in] Handle needed to access the runtimeList

  • index[in] : position in runtimeList

Returns

The Runtime from list at position index

Snpe_ErrorCode_t Snpe_RuntimeList_SetRuntime(Snpe_RuntimeList_Handle_t runtimeListHandle, size_t index, Snpe_Runtime_t runtime)

Set the Runtime of the list at position index.

Parameters
  • runtimeListHandle[in] : Handle needed to access the runtimeList

  • index[in] : position in runtimeList

  • runtime[in] : The Runtime to assign to position index

Returns

SNPE_SUCCESS on success

Snpe_ErrorCode_t Snpe_RuntimeList_Add(Snpe_RuntimeList_Handle_t runtimeListHandle, Snpe_Runtime_t runtime)

Adds runtime to the end of the runtime list order of precedence is former followed by latter entry.

Parameters
  • runtimeListHandle[in] Handle needed to access the runtimeList

  • runtime[in] to add

Returns

Error code. Ruturns SNPE_SUCCESS If the runtime added successfully

Snpe_ErrorCode_t Snpe_RuntimeList_Remove(Snpe_RuntimeList_Handle_t runtimeListHandle, Snpe_Runtime_t runtime)

Removes the runtime from the list.

Parameters
  • runtimeListHandle[in] Handle needed to access the runtimeList

  • runtime[in] to be removed

Returns

Error code. Ruturns SNPE_SUCCESS If the runtime removed successfully

size_t Snpe_RuntimeList_Size(Snpe_RuntimeList_Handle_t runtimeListHandle)

Returns the number of runtimes in the list.

Parameters

runtimeListHandle[in] Handle needed to access the runtimeList

Returns

number of entries in the runtimeList.

int Snpe_RuntimeList_Empty(Snpe_RuntimeList_Handle_t runtimeListHandle)

Returns 1 if the list is empty.

Parameters

runtimeListHandle[in] Handle needed to access the runtimeList

Returns

1 if list empty, 0 otherwise.

Snpe_ErrorCode_t Snpe_RuntimeList_Clear(Snpe_RuntimeList_Handle_t runtimeListHandle)

Removes all runtime from the list

Parameters

runtimeListHandle[in] Handle needed to access the runtimeList

Returns

Error code. Returns SNPE_SUCCESS if runtime list is cleared successfully.

Snpe_StringList_Handle_t Snpe_RuntimeList_GetRuntimeListNames(Snpe_RuntimeList_Handle_t runtimeListHandle)

Get a StringList of names from the runtime list in order of precedence.

Parameters

runtimeListHandle – Handle to a RuntimeList

Returns

Handle to a StringList

Snpe_Runtime_t Snpe_RuntimeList_StringToRuntime(const char *str)
Parameters

runtime[in] const char* Returns a Runtime enum corresponding to the in param string

const char *Snpe_RuntimeList_RuntimeToString(Snpe_Runtime_t runtime)
Parameters

runtime[in] Returns a const char* corresponding to the in param runtime enum