Environment

class Environment 
: JniHandle 

Environment to hold configuration options for LiteRT runtime.

Summary

Nested types

Options configurable in LiteRT environment.

Public companion functions

Environment
Environment
@ <Error class: unknown class>
create (
    npuAcceleratorProvider:  NpuAcceleratorProvider ,
    options:  Map < Environment.Option String >
)

Creates an environment with a NpuAcceleratorProvider , which provides the NPU libraries.

Public functions

Set < Accelerator >

Returns the set of accelerators available in the environment.

Protected functions

open Unit
destroy ()

Clean up resources associated with the handle.

Inherited functions

From com.google.ai.edge.litert.JniHandle
Unit

Asserts that the handle is not destroyed, otherwise throws an IllegalStateException .

final Unit
close ()

Clean up the handle safely to avoid releasing the same JNI handle multiple times.

Public companion functions

create

@ <Error class: unknown class> 

fun  create (options:  Map < Environment.Option String > = mapOf()):  Environment

create

@ <Error class: unknown class> 

fun  create (
    npuAcceleratorProvider:  NpuAcceleratorProvider ,
    options:  Map < Environment.Option String > = mapOf()
):  Environment

Creates an environment with a NpuAcceleratorProvider , which provides the NPU libraries.

Parameters
npuAcceleratorProvider:  NpuAcceleratorProvider

The NPU accelerator provider.

options:  Map < Environment.Option String > = mapOf()

The options to configure the environment.

Public functions

getAvailableAccelerators

@ <Error class: unknown class> 

fun  getAvailableAccelerators ():  Set < Accelerator >

Returns the set of accelerators available in the environment.

Protected functions

destroy

protected open fun  destroy 
():  Unit 

Clean up resources associated with the handle.

Create a Mobile Website
View Site in Mobile | Classic
Share by: