Class RuntimeList

Class Documentation

class RuntimeList

Public Functions

RuntimeList()

Creates a new runtime list.

RuntimeList(const RuntimeList &other)

Copy-Constructs a RuntimeList and returns a handle to it.

Parameters

other[in] Source RuntimeList

Returns

the handle to the created RuntimeList

RuntimeList(RuntimeList &&other) noexcept
RuntimeList(const Runtime_t &runtime)

Creates a new runtime list.

RuntimeList &operator=(const RuntimeList &other)

Copy-assigns the contents of srcHandle into dstHandle.

Parameters

other[in] Source RuntimeList

Returns

Reference to runtime list object post assignment

RuntimeList &operator=(RuntimeList &&other) noexcept

Move-assigns the contents of srcHandle into dstHandle.

Parameters

other[in] Source RuntimeList

Returns

Reference to runtime list object post assignment

Runtime_t operator[](size_t idx) const

Retrieves element at a particular index.

Parameters

idx[in] is index of element

Returns

Runtime list element at a particular index

RuntimeReference operator[](size_t idx) noexcept

Retrieves element at a particular index.

Parameters

idx[in] is index of element

Returns

Runtime list element at a particular index

bool add(const Runtime_t &runtime)

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

Parameters

runtime[in] to add

Returns

Error code. Ruturns SNPE_SUCCESS If the runtime added successfully

void remove(Runtime_t runtime) noexcept

Removes the runtime from the list.

Parameters

runtime[in] to be removed

Returns

Error code. Ruturns SNPE_SUCCESS If the runtime removed successfully

size_t size() const noexcept

Returns the number of runtimes in the list.

Returns

number of entries in the runtimeList.

bool empty() const noexcept

Returns 1 if the list is empty.

Returns

1 if list empty, 0 otherwise.

void clear() noexcept

Removes all runtime from the list.

Returns

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

StringList getRuntimeListNames() const

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

Returns

Handle to a StringList

Public Static Functions

static Runtime_t stringToRuntime(const char *runtimeStr)

Converts the input string to corresponding runtime.

Parameters

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

static const char *runtimeToString(Runtime_t runtime)

Converts the runtime enum to string.

Parameters

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