TensorBufferRequirements

class TensorBufferRequirements : JniHandle


Requirements for allocating a TensorBuffer.

Summary

Public functions

Int

Returns the size of the tensor buffer requirements in bytes.

IntArray

Returns the strides of the tensor buffer requirements.

List<TensorBufferType>

Returns all the types supported by the tensor buffer requirements.

Protected functions

open Unit

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

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

Public functions

bufferSize

@<Error class: unknown class>
fun bufferSize(): Int

Returns the size of the tensor buffer requirements in bytes.

strides

@<Error class: unknown class>
fun strides(): IntArray

Returns the strides of the tensor buffer requirements.

supportedTypes

@<Error class: unknown class>
fun supportedTypes(): List<TensorBufferType>

Returns all the types supported by the tensor buffer requirements.

Protected functions

destroy

protected open fun destroy(): Unit

Clean up resources associated with the handle.