neuralnetworks

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIBufferCopyFrom = binder.FirstCallTransaction + 0
	TransactionIBufferCopyTo   = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIBufferCopyFrom = "copyFrom"
	MethodIBufferCopyTo   = "copyTo"
)
View Source
const (
	TransactionIBurstExecuteSynchronously           = binder.FirstCallTransaction + 0
	TransactionIBurstReleaseMemoryResource          = binder.FirstCallTransaction + 1
	TransactionIBurstExecuteSynchronouslyWithConfig = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodIBurstExecuteSynchronously           = "executeSynchronously"
	MethodIBurstReleaseMemoryResource          = "releaseMemoryResource"
	MethodIBurstExecuteSynchronouslyWithConfig = "executeSynchronouslyWithConfig"
)
View Source
const (
	TransactionIDeviceAllocate                    = binder.FirstCallTransaction + 0
	TransactionIDeviceGetCapabilities             = binder.FirstCallTransaction + 1
	TransactionIDeviceGetNumberOfCacheFilesNeeded = binder.FirstCallTransaction + 2
	TransactionIDeviceGetSupportedExtensions      = binder.FirstCallTransaction + 3
	TransactionIDeviceGetSupportedOperations      = binder.FirstCallTransaction + 4
	TransactionIDeviceGetType                     = binder.FirstCallTransaction + 5
	TransactionIDeviceGetVersionString            = binder.FirstCallTransaction + 6
	TransactionIDevicePrepareModel                = binder.FirstCallTransaction + 7
	TransactionIDevicePrepareModelFromCache       = binder.FirstCallTransaction + 8
	TransactionIDevicePrepareModelWithConfig      = binder.FirstCallTransaction + 9
)
View Source
const (
	MethodIDeviceAllocate                    = "allocate"
	MethodIDeviceGetCapabilities             = "getCapabilities"
	MethodIDeviceGetNumberOfCacheFilesNeeded = "getNumberOfCacheFilesNeeded"
	MethodIDeviceGetSupportedExtensions      = "getSupportedExtensions"
	MethodIDeviceGetSupportedOperations      = "getSupportedOperations"
	MethodIDeviceGetType                     = "getType"
	MethodIDeviceGetVersionString            = "getVersionString"
	MethodIDevicePrepareModel                = "prepareModel"
	MethodIDevicePrepareModelFromCache       = "prepareModelFromCache"
	MethodIDevicePrepareModelWithConfig      = "prepareModelWithConfig"
)
View Source
const (
	IDeviceByteSizeOfCacheToken        int32 = int32(PrepareModelConfigByteSizeOfCacheToken)
	IDeviceMaxNumberOfCacheFiles       int32 = 32
	IDeviceExtensionTypeHighBitsPrefix int32 = 15
	IDeviceExtensionTypeLowBitsType    int32 = 16
	IDeviceOperandTypeBaseMax          int32 = 65535
	IDeviceOperationTypeBaseMax        int32 = 65535
)
View Source
const (
	TransactionIExecutionExecuteSynchronously = binder.FirstCallTransaction + 0
	TransactionIExecutionExecuteFenced        = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIExecutionExecuteSynchronously = "executeSynchronously"
	MethodIExecutionExecuteFenced        = "executeFenced"
)
View Source
const (
	TransactionIPreparedModelExecuteSynchronously           = binder.FirstCallTransaction + 0
	TransactionIPreparedModelExecuteFenced                  = binder.FirstCallTransaction + 1
	TransactionIPreparedModelConfigureExecutionBurst        = binder.FirstCallTransaction + 2
	TransactionIPreparedModelCreateReusableExecution        = binder.FirstCallTransaction + 3
	TransactionIPreparedModelExecuteSynchronouslyWithConfig = binder.FirstCallTransaction + 4
	TransactionIPreparedModelExecuteFencedWithConfig        = binder.FirstCallTransaction + 5
)
View Source
const (
	MethodIPreparedModelExecuteSynchronously           = "executeSynchronously"
	MethodIPreparedModelExecuteFenced                  = "executeFenced"
	MethodIPreparedModelConfigureExecutionBurst        = "configureExecutionBurst"
	MethodIPreparedModelCreateReusableExecution        = "createReusableExecution"
	MethodIPreparedModelExecuteSynchronouslyWithConfig = "executeSynchronouslyWithConfig"
	MethodIPreparedModelExecuteFencedWithConfig        = "executeFencedWithConfig"
)
View Source
const (
	IPreparedModelDefaultLoopTimeoutDurationNs int64 = 2000000000
	IPreparedModelMaximumLoopTimeoutDurationNs int64 = 15000000000
)
View Source
const (
	MemoryTagAshmem         int32 = 0
	MemoryTagMappableFile   int32 = 1
	MemoryTagHardwareBuffer int32 = 2
)
View Source
const (
	OperandExtraParamsTagChannelQuant int32 = 0
	OperandExtraParamsTagExtension    int32 = 1
)
View Source
const (
	RequestMemoryPoolTagPool  int32 = 0
	RequestMemoryPoolTagToken int32 = 1
)
View Source
const DescriptorIBuffer = "android.hardware.neuralnetworks.IBuffer"
View Source
const DescriptorIBurst = "android.hardware.neuralnetworks.IBurst"
View Source
const DescriptorIDevice = "android.hardware.neuralnetworks.IDevice"
View Source
const DescriptorIExecution = "android.hardware.neuralnetworks.IExecution"
View Source
const DescriptorIFencedExecutionCallback = "android.hardware.neuralnetworks.IFencedExecutionCallback"
View Source
const DescriptorIPreparedModel = "android.hardware.neuralnetworks.IPreparedModel"
View Source
const DescriptorIPreparedModelCallback = "android.hardware.neuralnetworks.IPreparedModelCallback"
View Source
const (
	MethodIFencedExecutionCallbackGetExecutionInfo = "getExecutionInfo"
)
View Source
const (
	MethodIPreparedModelCallbackNotify = "notify"
)
View Source
const (
	PrepareModelConfigByteSizeOfCacheToken int32 = 32
)
View Source
const (
	TransactionIFencedExecutionCallbackGetExecutionInfo = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIPreparedModelCallbackNotify = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferDesc

type BufferDesc struct {
	Dimensions []int32
}

func (*BufferDesc) MarshalParcel

func (s *BufferDesc) MarshalParcel(
	p *parcel.Parcel,
) error

func (*BufferDesc) UnmarshalParcel

func (s *BufferDesc) UnmarshalParcel(
	p *parcel.Parcel,
) error

type BufferProxy

type BufferProxy struct {
	Remote binder.IBinder
}

func NewBufferProxy

func NewBufferProxy(
	remote binder.IBinder,
) *BufferProxy

func (*BufferProxy) AsBinder

func (p *BufferProxy) AsBinder() binder.IBinder

func (*BufferProxy) CopyFrom

func (p *BufferProxy) CopyFrom(
	ctx context.Context,
	src Memory,
	dimensions []int32,
) error

func (*BufferProxy) CopyTo

func (p *BufferProxy) CopyTo(
	ctx context.Context,
	dst Memory,
) error

type BufferRole

type BufferRole struct {
	ModelIndex  int32
	IoIndex     int32
	Probability float32
}

func (*BufferRole) MarshalParcel

func (s *BufferRole) MarshalParcel(
	p *parcel.Parcel,
) error

func (*BufferRole) UnmarshalParcel

func (s *BufferRole) UnmarshalParcel(
	p *parcel.Parcel,
) error

type BufferStub

type BufferStub struct {
	Impl      IBuffer
	Transport binder.VersionAwareTransport
}

BufferStub dispatches incoming binder transactions to a typed IBuffer implementation.

func (*BufferStub) Descriptor

func (s *BufferStub) Descriptor() string

func (*BufferStub) OnTransaction

func (s *BufferStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type BurstProxy

type BurstProxy struct {
	Remote binder.IBinder
}

func NewBurstProxy

func NewBurstProxy(
	remote binder.IBinder,
) *BurstProxy

func (*BurstProxy) AsBinder

func (p *BurstProxy) AsBinder() binder.IBinder

func (*BurstProxy) ExecuteSynchronously

func (p *BurstProxy) ExecuteSynchronously(
	ctx context.Context,
	request Request,
	memoryIdentifierTokens []int64,
	measureTiming bool,
	deadlineNs int64,
	loopTimeoutDurationNs int64,
) (ExecutionResult, error)

func (*BurstProxy) ExecuteSynchronouslyWithConfig

func (p *BurstProxy) ExecuteSynchronouslyWithConfig(
	ctx context.Context,
	request Request,
	memoryIdentifierTokens []int64,
	config ExecutionConfig,
	deadlineNs int64,
) (ExecutionResult, error)

func (*BurstProxy) ReleaseMemoryResource

func (p *BurstProxy) ReleaseMemoryResource(
	ctx context.Context,
	memoryIdentifierToken int64,
) error

type BurstStub

type BurstStub struct {
	Impl      IBurst
	Transport binder.VersionAwareTransport
}

BurstStub dispatches incoming binder transactions to a typed IBurst implementation.

func (*BurstStub) Descriptor

func (s *BurstStub) Descriptor() string

func (*BurstStub) OnTransaction

func (s *BurstStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type Capabilities

type Capabilities struct {
	RelaxedFloat32toFloat16PerformanceScalar PerformanceInfo
	RelaxedFloat32toFloat16PerformanceTensor PerformanceInfo
	OperandPerformance                       []OperandPerformance
	IfPerformance                            PerformanceInfo
	WhilePerformance                         PerformanceInfo
}

func (*Capabilities) MarshalParcel

func (s *Capabilities) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Capabilities) UnmarshalParcel

func (s *Capabilities) UnmarshalParcel(
	p *parcel.Parcel,
) error

type DataLocation

type DataLocation struct {
	PoolIndex int32
	Offset    int64
	Length    int64
	Padding   int64
}

func (*DataLocation) MarshalParcel

func (s *DataLocation) MarshalParcel(
	p *parcel.Parcel,
) error

func (*DataLocation) UnmarshalParcel

func (s *DataLocation) UnmarshalParcel(
	p *parcel.Parcel,
) error

type DeviceBuffer

type DeviceBuffer struct {
	Buffer IBuffer
	Token  int32
}

func (*DeviceBuffer) MarshalParcel

func (s *DeviceBuffer) MarshalParcel(
	p *parcel.Parcel,
) error

func (*DeviceBuffer) UnmarshalParcel

func (s *DeviceBuffer) UnmarshalParcel(
	p *parcel.Parcel,
) error

type DeviceProxy

type DeviceProxy struct {
	Remote binder.IBinder
}

func NewDeviceProxy

func NewDeviceProxy(
	remote binder.IBinder,
) *DeviceProxy

func (*DeviceProxy) Allocate

func (p *DeviceProxy) Allocate(
	ctx context.Context,
	desc BufferDesc,
	preparedModels []IPreparedModelParcel,
	inputRoles []BufferRole,
	outputRoles []BufferRole,
) (DeviceBuffer, error)

func (*DeviceProxy) AsBinder

func (p *DeviceProxy) AsBinder() binder.IBinder

func (*DeviceProxy) GetCapabilities

func (p *DeviceProxy) GetCapabilities(
	ctx context.Context,
) (Capabilities, error)

func (*DeviceProxy) GetNumberOfCacheFilesNeeded

func (p *DeviceProxy) GetNumberOfCacheFilesNeeded(
	ctx context.Context,
) (NumberOfCacheFiles, error)

func (*DeviceProxy) GetSupportedExtensions

func (p *DeviceProxy) GetSupportedExtensions(
	ctx context.Context,
) ([]Extension, error)

func (*DeviceProxy) GetSupportedOperations

func (p *DeviceProxy) GetSupportedOperations(
	ctx context.Context,
	model Model,
) ([]bool, error)

func (*DeviceProxy) GetType

func (p *DeviceProxy) GetType(
	ctx context.Context,
) (DeviceType, error)

func (*DeviceProxy) GetVersionString

func (p *DeviceProxy) GetVersionString(
	ctx context.Context,
) (string, error)

func (*DeviceProxy) PrepareModel

func (p *DeviceProxy) PrepareModel(
	ctx context.Context,
	model Model,
	preference ExecutionPreference,
	priority Priority,
	deadlineNs int64,
	modelCache []int32,
	dataCache []int32,
	token []byte,
	callback IPreparedModelCallback,
) error

func (*DeviceProxy) PrepareModelFromCache

func (p *DeviceProxy) PrepareModelFromCache(
	ctx context.Context,
	deadlineNs int64,
	modelCache []int32,
	dataCache []int32,
	token []byte,
	callback IPreparedModelCallback,
) error

func (*DeviceProxy) PrepareModelWithConfig

func (p *DeviceProxy) PrepareModelWithConfig(
	ctx context.Context,
	model Model,
	config PrepareModelConfig,
	callback IPreparedModelCallback,
) error

type DeviceStub

type DeviceStub struct {
	Impl      IDevice
	Transport binder.VersionAwareTransport
}

DeviceStub dispatches incoming binder transactions to a typed IDevice implementation.

func (*DeviceStub) Descriptor

func (s *DeviceStub) Descriptor() string

func (*DeviceStub) OnTransaction

func (s *DeviceStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type DeviceType

type DeviceType int32
const (
	DeviceTypeOTHER       DeviceType = 1
	DeviceTypeCPU         DeviceType = 2
	DeviceTypeGPU         DeviceType = 3
	DeviceTypeACCELERATOR DeviceType = 4
)

type ErrorStatus

type ErrorStatus int32
const (
	ErrorStatusNONE                        ErrorStatus = 0
	ErrorStatusDeviceUnavailable           ErrorStatus = 1
	ErrorStatusGeneralFailure              ErrorStatus = 2
	ErrorStatusOutputInsufficientSize      ErrorStatus = 3
	ErrorStatusInvalidArgument             ErrorStatus = 4
	ErrorStatusMissedDeadlineTransient     ErrorStatus = 5
	ErrorStatusMissedDeadlinePersistent    ErrorStatus = 6
	ErrorStatusResourceExhaustedTransient  ErrorStatus = 7
	ErrorStatusResourceExhaustedPersistent ErrorStatus = 8
)

type ExecutionConfig

type ExecutionConfig struct {
	MeasureTiming         bool
	LoopTimeoutDurationNs int64
	ExecutionHints        []TokenValuePair
	ExtensionNameToPrefix []ExtensionNameAndPrefix
}

func (*ExecutionConfig) MarshalParcel

func (s *ExecutionConfig) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ExecutionConfig) UnmarshalParcel

func (s *ExecutionConfig) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ExecutionPreference

type ExecutionPreference int32
const (
	ExecutionPreferenceLowPower         ExecutionPreference = 0
	ExecutionPreferenceFastSingleAnswer ExecutionPreference = 1
	ExecutionPreferenceSustainedSpeed   ExecutionPreference = 2
)

type ExecutionProxy

type ExecutionProxy struct {
	Remote binder.IBinder
}

func NewExecutionProxy

func NewExecutionProxy(
	remote binder.IBinder,
) *ExecutionProxy

func (*ExecutionProxy) AsBinder

func (p *ExecutionProxy) AsBinder() binder.IBinder

func (*ExecutionProxy) ExecuteFenced

func (p *ExecutionProxy) ExecuteFenced(
	ctx context.Context,
	waitFor []int32,
	deadlineNs int64,
	durationNs int64,
) (FencedExecutionResult, error)

func (*ExecutionProxy) ExecuteSynchronously

func (p *ExecutionProxy) ExecuteSynchronously(
	ctx context.Context,
	deadlineNs int64,
) (ExecutionResult, error)

type ExecutionResult

type ExecutionResult struct {
	OutputSufficientSize bool
	OutputShapes         []OutputShape
	Timing               Timing
}

func (*ExecutionResult) MarshalParcel

func (s *ExecutionResult) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ExecutionResult) UnmarshalParcel

func (s *ExecutionResult) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ExecutionStub

type ExecutionStub struct {
	Impl      IExecution
	Transport binder.VersionAwareTransport
}

ExecutionStub dispatches incoming binder transactions to a typed IExecution implementation.

func (*ExecutionStub) Descriptor

func (s *ExecutionStub) Descriptor() string

func (*ExecutionStub) OnTransaction

func (s *ExecutionStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type Extension

type Extension struct {
	Name         string
	OperandTypes []ExtensionOperandTypeInformation
}

func (*Extension) MarshalParcel

func (s *Extension) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Extension) UnmarshalParcel

func (s *Extension) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ExtensionNameAndPrefix

type ExtensionNameAndPrefix struct {
	Name   string
	Prefix uint16
}

func (*ExtensionNameAndPrefix) MarshalParcel

func (s *ExtensionNameAndPrefix) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ExtensionNameAndPrefix) UnmarshalParcel

func (s *ExtensionNameAndPrefix) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ExtensionOperandTypeInformation

type ExtensionOperandTypeInformation struct {
	Type     uint16
	IsTensor bool
	ByteSize int32
}

func (*ExtensionOperandTypeInformation) MarshalParcel

func (s *ExtensionOperandTypeInformation) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ExtensionOperandTypeInformation) UnmarshalParcel

func (s *ExtensionOperandTypeInformation) UnmarshalParcel(
	p *parcel.Parcel,
) error

type FencedExecutionCallbackProxy

type FencedExecutionCallbackProxy struct {
	Remote binder.IBinder
}

func NewFencedExecutionCallbackProxy

func NewFencedExecutionCallbackProxy(
	remote binder.IBinder,
) *FencedExecutionCallbackProxy

func (*FencedExecutionCallbackProxy) AsBinder

func (*FencedExecutionCallbackProxy) GetExecutionInfo

func (p *FencedExecutionCallbackProxy) GetExecutionInfo(
	ctx context.Context,
	timingLaunched Timing,
	timingFenced Timing,
) (ErrorStatus, error)

type FencedExecutionCallbackStub

type FencedExecutionCallbackStub struct {
	Impl      IFencedExecutionCallback
	Transport binder.VersionAwareTransport
}

FencedExecutionCallbackStub dispatches incoming binder transactions to a typed IFencedExecutionCallback implementation.

func (*FencedExecutionCallbackStub) Descriptor

func (s *FencedExecutionCallbackStub) Descriptor() string

func (*FencedExecutionCallbackStub) OnTransaction

func (s *FencedExecutionCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type FencedExecutionResult

type FencedExecutionResult struct {
	Callback  IFencedExecutionCallback
	SyncFence int32
}

func (*FencedExecutionResult) MarshalParcel

func (s *FencedExecutionResult) MarshalParcel(
	p *parcel.Parcel,
) error

func (*FencedExecutionResult) UnmarshalParcel

func (s *FencedExecutionResult) UnmarshalParcel(
	p *parcel.Parcel,
) error

type FusedActivationFunc

type FusedActivationFunc int32
const (
	FusedActivationFuncNONE  FusedActivationFunc = 0
	FusedActivationFuncRELU  FusedActivationFunc = 1
	FusedActivationFuncRELU1 FusedActivationFunc = 2
	FusedActivationFuncRELU6 FusedActivationFunc = 3
)

type IBuffer

type IBuffer interface {
	AsBinder() binder.IBinder
	CopyFrom(ctx context.Context, src Memory, dimensions []int32) error
	CopyTo(ctx context.Context, dst Memory) error
}

func NewBufferStub

func NewBufferStub(
	impl IBufferServer,
) IBuffer

NewBufferStub creates a server-side IBuffer wrapping the given server implementation. The returned value satisfies IBuffer and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IBufferServer

type IBufferServer interface {
	CopyFrom(ctx context.Context, src Memory, dimensions []int32) error
	CopyTo(ctx context.Context, dst Memory) error
}

IBufferServer is the server-side interface that user implementations provide to NewBufferStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IBurst

type IBurst interface {
	AsBinder() binder.IBinder
	ExecuteSynchronously(ctx context.Context, request Request, memoryIdentifierTokens []int64, measureTiming bool, deadlineNs int64, loopTimeoutDurationNs int64) (ExecutionResult, error)
	ReleaseMemoryResource(ctx context.Context, memoryIdentifierToken int64) error
	ExecuteSynchronouslyWithConfig(ctx context.Context, request Request, memoryIdentifierTokens []int64, config ExecutionConfig, deadlineNs int64) (ExecutionResult, error)
}

func NewBurstStub

func NewBurstStub(
	impl IBurstServer,
) IBurst

NewBurstStub creates a server-side IBurst wrapping the given server implementation. The returned value satisfies IBurst and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IBurstServer

type IBurstServer interface {
	ExecuteSynchronously(ctx context.Context, request Request, memoryIdentifierTokens []int64, measureTiming bool, deadlineNs int64, loopTimeoutDurationNs int64) (ExecutionResult, error)
	ReleaseMemoryResource(ctx context.Context, memoryIdentifierToken int64) error
	ExecuteSynchronouslyWithConfig(ctx context.Context, request Request, memoryIdentifierTokens []int64, config ExecutionConfig, deadlineNs int64) (ExecutionResult, error)
}

IBurstServer is the server-side interface that user implementations provide to NewBurstStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IDevice

type IDevice interface {
	AsBinder() binder.IBinder
	Allocate(ctx context.Context, desc BufferDesc, preparedModels []IPreparedModelParcel, inputRoles []BufferRole, outputRoles []BufferRole) (DeviceBuffer, error)
	GetCapabilities(ctx context.Context) (Capabilities, error)
	GetNumberOfCacheFilesNeeded(ctx context.Context) (NumberOfCacheFiles, error)
	GetSupportedExtensions(ctx context.Context) ([]Extension, error)
	GetSupportedOperations(ctx context.Context, model Model) ([]bool, error)
	GetType(ctx context.Context) (DeviceType, error)
	GetVersionString(ctx context.Context) (string, error)
	PrepareModel(ctx context.Context, model Model, preference ExecutionPreference, priority Priority, deadlineNs int64, modelCache []int32, dataCache []int32, token []byte, callback IPreparedModelCallback) error
	PrepareModelFromCache(ctx context.Context, deadlineNs int64, modelCache []int32, dataCache []int32, token []byte, callback IPreparedModelCallback) error
	PrepareModelWithConfig(ctx context.Context, model Model, config PrepareModelConfig, callback IPreparedModelCallback) error
}

func NewDeviceStub

func NewDeviceStub(
	impl IDeviceServer,
) IDevice

NewDeviceStub creates a server-side IDevice wrapping the given server implementation. The returned value satisfies IDevice and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IDeviceServer

type IDeviceServer interface {
	Allocate(ctx context.Context, desc BufferDesc, preparedModels []IPreparedModelParcel, inputRoles []BufferRole, outputRoles []BufferRole) (DeviceBuffer, error)
	GetCapabilities(ctx context.Context) (Capabilities, error)
	GetNumberOfCacheFilesNeeded(ctx context.Context) (NumberOfCacheFiles, error)
	GetSupportedExtensions(ctx context.Context) ([]Extension, error)
	GetSupportedOperations(ctx context.Context, model Model) ([]bool, error)
	GetType(ctx context.Context) (DeviceType, error)
	GetVersionString(ctx context.Context) (string, error)
	PrepareModel(ctx context.Context, model Model, preference ExecutionPreference, priority Priority, deadlineNs int64, modelCache []int32, dataCache []int32, token []byte, callback IPreparedModelCallback) error
	PrepareModelFromCache(ctx context.Context, deadlineNs int64, modelCache []int32, dataCache []int32, token []byte, callback IPreparedModelCallback) error
	PrepareModelWithConfig(ctx context.Context, model Model, config PrepareModelConfig, callback IPreparedModelCallback) error
}

IDeviceServer is the server-side interface that user implementations provide to NewDeviceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IExecution

type IExecution interface {
	AsBinder() binder.IBinder
	ExecuteSynchronously(ctx context.Context, deadlineNs int64) (ExecutionResult, error)
	ExecuteFenced(ctx context.Context, waitFor []int32, deadlineNs int64, durationNs int64) (FencedExecutionResult, error)
}

func NewExecutionStub

func NewExecutionStub(
	impl IExecutionServer,
) IExecution

NewExecutionStub creates a server-side IExecution wrapping the given server implementation. The returned value satisfies IExecution and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IExecutionServer

type IExecutionServer interface {
	ExecuteSynchronously(ctx context.Context, deadlineNs int64) (ExecutionResult, error)
	ExecuteFenced(ctx context.Context, waitFor []int32, deadlineNs int64, durationNs int64) (FencedExecutionResult, error)
}

IExecutionServer is the server-side interface that user implementations provide to NewExecutionStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IFencedExecutionCallback

type IFencedExecutionCallback interface {
	AsBinder() binder.IBinder
	GetExecutionInfo(ctx context.Context, timingLaunched Timing, timingFenced Timing) (ErrorStatus, error)
}

func NewFencedExecutionCallbackStub

func NewFencedExecutionCallbackStub(
	impl IFencedExecutionCallbackServer,
) IFencedExecutionCallback

NewFencedExecutionCallbackStub creates a server-side IFencedExecutionCallback wrapping the given server implementation. The returned value satisfies IFencedExecutionCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IFencedExecutionCallbackServer

type IFencedExecutionCallbackServer interface {
	GetExecutionInfo(ctx context.Context, timingLaunched Timing, timingFenced Timing) (ErrorStatus, error)
}

IFencedExecutionCallbackServer is the server-side interface that user implementations provide to NewFencedExecutionCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IPreparedModel

type IPreparedModel interface {
	AsBinder() binder.IBinder
	ExecuteSynchronously(ctx context.Context, request Request, measureTiming bool, deadlineNs int64, loopTimeoutDurationNs int64) (ExecutionResult, error)
	ExecuteFenced(ctx context.Context, request Request, waitFor []int32, measureTiming bool, deadlineNs int64, loopTimeoutDurationNs int64, durationNs int64) (FencedExecutionResult, error)
	ConfigureExecutionBurst(ctx context.Context) (IBurst, error)
	CreateReusableExecution(ctx context.Context, request Request, config ExecutionConfig) (IExecution, error)
	ExecuteSynchronouslyWithConfig(ctx context.Context, request Request, config ExecutionConfig, deadlineNs int64) (ExecutionResult, error)
	ExecuteFencedWithConfig(ctx context.Context, request Request, waitFor []int32, config ExecutionConfig, deadlineNs int64, durationNs int64) (FencedExecutionResult, error)
}

func NewPreparedModelStub

func NewPreparedModelStub(
	impl IPreparedModelServer,
) IPreparedModel

NewPreparedModelStub creates a server-side IPreparedModel wrapping the given server implementation. The returned value satisfies IPreparedModel and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IPreparedModelCallback

type IPreparedModelCallback interface {
	AsBinder() binder.IBinder
	Notify(ctx context.Context, status ErrorStatus, preparedModel IPreparedModel) error
}

func NewPreparedModelCallbackStub

func NewPreparedModelCallbackStub(
	impl IPreparedModelCallbackServer,
) IPreparedModelCallback

NewPreparedModelCallbackStub creates a server-side IPreparedModelCallback wrapping the given server implementation. The returned value satisfies IPreparedModelCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IPreparedModelCallbackServer

type IPreparedModelCallbackServer interface {
	Notify(ctx context.Context, status ErrorStatus, preparedModel IPreparedModel) error
}

IPreparedModelCallbackServer is the server-side interface that user implementations provide to NewPreparedModelCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IPreparedModelParcel

type IPreparedModelParcel struct {
	PreparedModel IPreparedModel
}

func (*IPreparedModelParcel) MarshalParcel

func (s *IPreparedModelParcel) MarshalParcel(
	p *parcel.Parcel,
) error

func (*IPreparedModelParcel) UnmarshalParcel

func (s *IPreparedModelParcel) UnmarshalParcel(
	p *parcel.Parcel,
) error

type IPreparedModelServer

type IPreparedModelServer interface {
	ExecuteSynchronously(ctx context.Context, request Request, measureTiming bool, deadlineNs int64, loopTimeoutDurationNs int64) (ExecutionResult, error)
	ExecuteFenced(ctx context.Context, request Request, waitFor []int32, measureTiming bool, deadlineNs int64, loopTimeoutDurationNs int64, durationNs int64) (FencedExecutionResult, error)
	ConfigureExecutionBurst(ctx context.Context) (IBurst, error)
	CreateReusableExecution(ctx context.Context, request Request, config ExecutionConfig) (IExecution, error)
	ExecuteSynchronouslyWithConfig(ctx context.Context, request Request, config ExecutionConfig, deadlineNs int64) (ExecutionResult, error)
	ExecuteFencedWithConfig(ctx context.Context, request Request, waitFor []int32, config ExecutionConfig, deadlineNs int64, durationNs int64) (FencedExecutionResult, error)
}

IPreparedModelServer is the server-side interface that user implementations provide to NewPreparedModelStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type Memory

type Memory struct {
	Tag            int32
	Ashmem         common.Ashmem
	MappableFile   common.MappableFile
	HardwareBuffer graphicsCommon.HardwareBuffer
}

func (*Memory) GetAshmem

func (u *Memory) GetAshmem() (common.Ashmem, bool)

func (*Memory) GetHardwareBuffer

func (u *Memory) GetHardwareBuffer() (graphicsCommon.HardwareBuffer, bool)

func (*Memory) GetMappableFile

func (u *Memory) GetMappableFile() (common.MappableFile, bool)

func (*Memory) MarshalParcel

func (u *Memory) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Memory) SetAshmem

func (u *Memory) SetAshmem(
	v common.Ashmem,
)

func (*Memory) SetHardwareBuffer

func (u *Memory) SetHardwareBuffer(
	v graphicsCommon.HardwareBuffer,
)

func (*Memory) SetMappableFile

func (u *Memory) SetMappableFile(
	v common.MappableFile,
)

func (*Memory) UnmarshalParcel

func (u *Memory) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Model

type Model struct {
	Main                             Subgraph
	Referenced                       []Subgraph
	OperandValues                    []byte
	Pools                            []Memory
	RelaxComputationFloat32toFloat16 bool
	ExtensionNameToPrefix            []ExtensionNameAndPrefix
}

func (*Model) MarshalParcel

func (s *Model) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Model) UnmarshalParcel

func (s *Model) UnmarshalParcel(
	p *parcel.Parcel,
) error

type NumberOfCacheFiles

type NumberOfCacheFiles struct {
	NumModelCache int32
	NumDataCache  int32
}

func (*NumberOfCacheFiles) MarshalParcel

func (s *NumberOfCacheFiles) MarshalParcel(
	p *parcel.Parcel,
) error

func (*NumberOfCacheFiles) UnmarshalParcel

func (s *NumberOfCacheFiles) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Operand

type Operand struct {
	Type        OperandType
	Dimensions  []int32
	Scale       float32
	ZeroPoint   int32
	Lifetime    OperandLifeTime
	Location    DataLocation
	ExtraParams *OperandExtraParams
}

func (*Operand) MarshalParcel

func (s *Operand) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Operand) UnmarshalParcel

func (s *Operand) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OperandExtraParams

type OperandExtraParams struct {
	Tag          int32
	ChannelQuant SymmPerChannelQuantParams
	Extension    []byte
}

func (*OperandExtraParams) GetChannelQuant

func (u *OperandExtraParams) GetChannelQuant() (SymmPerChannelQuantParams, bool)

func (*OperandExtraParams) GetExtension

func (u *OperandExtraParams) GetExtension() ([]byte, bool)

func (*OperandExtraParams) MarshalParcel

func (u *OperandExtraParams) MarshalParcel(
	p *parcel.Parcel,
) error

func (*OperandExtraParams) SetChannelQuant

func (u *OperandExtraParams) SetChannelQuant(
	v SymmPerChannelQuantParams,
)

func (*OperandExtraParams) SetExtension

func (u *OperandExtraParams) SetExtension(
	v []byte,
)

func (*OperandExtraParams) UnmarshalParcel

func (u *OperandExtraParams) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OperandLifeTime

type OperandLifeTime int32
const (
	OperandLifeTimeTemporaryVariable OperandLifeTime = 0
	OperandLifeTimeSubgraphInput     OperandLifeTime = 1
	OperandLifeTimeSubgraphOutput    OperandLifeTime = 2
	OperandLifeTimeConstantCopy      OperandLifeTime = 3
	OperandLifeTimeConstantPool      OperandLifeTime = 4
	OperandLifeTimeNoValue           OperandLifeTime = 5
	OperandLifeTimeSUBGRAPH          OperandLifeTime = 6
)

type OperandPerformance

type OperandPerformance struct {
	Type OperandType
	Info PerformanceInfo
}

func (*OperandPerformance) MarshalParcel

func (s *OperandPerformance) MarshalParcel(
	p *parcel.Parcel,
) error

func (*OperandPerformance) UnmarshalParcel

func (s *OperandPerformance) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OperandType

type OperandType int32
const (
	OperandTypeFLOAT32                    OperandType = 0
	OperandTypeINT32                      OperandType = 1
	OperandTypeUINT32                     OperandType = 2
	OperandTypeTensorFloat32              OperandType = 3
	OperandTypeTensorInt32                OperandType = 4
	OperandTypeTensorQuant8Asymm          OperandType = 5
	OperandTypeBOOL                       OperandType = 6
	OperandTypeTensorQuant16Symm          OperandType = 7
	OperandTypeTensorFloat16              OperandType = 8
	OperandTypeTensorBool8                OperandType = 9
	OperandTypeFLOAT16                    OperandType = 10
	OperandTypeTensorQuant8SymmPerChannel OperandType = 11
	OperandTypeTensorQuant16Asymm         OperandType = 12
	OperandTypeTensorQuant8Symm           OperandType = 13
	OperandTypeTensorQuant8AsymmSigned    OperandType = 14
	OperandTypeSUBGRAPH                   OperandType = 15
)

type Operation

type Operation struct {
	Type    OperationType
	Inputs  []int32
	Outputs []int32
}

func (*Operation) MarshalParcel

func (s *Operation) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Operation) UnmarshalParcel

func (s *Operation) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OperationType

type OperationType int32
const (
	OperationTypeADD                        OperationType = 0
	OperationTypeAveragePool2d              OperationType = 1
	OperationTypeCONCATENATION              OperationType = 2
	OperationTypeConv2d                     OperationType = 3
	OperationTypeDepthwiseConv2d            OperationType = 4
	OperationTypeDepthToSpace               OperationType = 5
	OperationTypeDEQUANTIZE                 OperationType = 6
	OperationTypeEmbeddingLookup            OperationType = 7
	OperationTypeFLOOR                      OperationType = 8
	OperationTypeFullyConnected             OperationType = 9
	OperationTypeHashtableLookup            OperationType = 10
	OperationTypeL2Normalization            OperationType = 11
	OperationTypeL2Pool2d                   OperationType = 12
	OperationTypeLocalResponseNormalization OperationType = 13
	OperationTypeLOGISTIC                   OperationType = 14
	OperationTypeLshProjection              OperationType = 15
	OperationTypeLSTM                       OperationType = 16
	OperationTypeMaxPool2d                  OperationType = 17
	OperationTypeMUL                        OperationType = 18
	OperationTypeRELU                       OperationType = 19
	OperationTypeRELU1                      OperationType = 20
	OperationTypeRELU6                      OperationType = 21
	OperationTypeRESHAPE                    OperationType = 22
	OperationTypeResizeBilinear             OperationType = 23
	OperationTypeRNN                        OperationType = 24
	OperationTypeSOFTMAX                    OperationType = 25
	OperationTypeSpaceToDepth               OperationType = 26
	OperationTypeSVDF                       OperationType = 27
	OperationTypeTANH                       OperationType = 28
	OperationTypeBatchToSpaceNd             OperationType = 29
	OperationTypeDIV                        OperationType = 30
	OperationTypeMEAN                       OperationType = 31
	OperationTypePAD                        OperationType = 32
	OperationTypeSpaceToBatchNd             OperationType = 33
	OperationTypeSQUEEZE                    OperationType = 34
	OperationTypeStridedSlice               OperationType = 35
	OperationTypeSUB                        OperationType = 36
	OperationTypeTRANSPOSE                  OperationType = 37
	OperationTypeABS                        OperationType = 38
	OperationTypeARGMAX                     OperationType = 39
	OperationTypeARGMIN                     OperationType = 40
	OperationTypeAxisAlignedBboxTransform   OperationType = 41
	OperationTypeBidirectionalSequenceLstm  OperationType = 42
	OperationTypeBidirectionalSequenceRnn   OperationType = 43
	OperationTypeBoxWithNmsLimit            OperationType = 44
	OperationTypeCAST                       OperationType = 45
	OperationTypeChannelShuffle             OperationType = 46
	OperationTypeDetectionPostprocessing    OperationType = 47
	OperationTypeEQUAL                      OperationType = 48
	OperationTypeEXP                        OperationType = 49
	OperationTypeExpandDims                 OperationType = 50
	OperationTypeGATHER                     OperationType = 51
	OperationTypeGenerateProposals          OperationType = 52
	OperationTypeGREATER                    OperationType = 53
	OperationTypeGreaterEqual               OperationType = 54
	OperationTypeGroupedConv2d              OperationType = 55
	OperationTypeHeatmapMaxKeypoint         OperationType = 56
	OperationTypeInstanceNormalization      OperationType = 57
	OperationTypeLESS                       OperationType = 58
	OperationTypeLessEqual                  OperationType = 59
	OperationTypeLOG                        OperationType = 60
	OperationTypeLogicalAnd                 OperationType = 61
	OperationTypeLogicalNot                 OperationType = 62
	OperationTypeLogicalOr                  OperationType = 63
	OperationTypeLogSoftmax                 OperationType = 64
	OperationTypeMAXIMUM                    OperationType = 65
	OperationTypeMINIMUM                    OperationType = 66
	OperationTypeNEG                        OperationType = 67
	OperationTypeNotEqual                   OperationType = 68
	OperationTypePadV2                      OperationType = 69
	OperationTypePOW                        OperationType = 70
	OperationTypePRELU                      OperationType = 71
	OperationTypeQUANTIZE                   OperationType = 72
	OperationTypeQuantized16bitLstm         OperationType = 73
	OperationTypeRandomMultinomial          OperationType = 74
	OperationTypeReduceAll                  OperationType = 75
	OperationTypeReduceAny                  OperationType = 76
	OperationTypeReduceMax                  OperationType = 77
	OperationTypeReduceMin                  OperationType = 78
	OperationTypeReduceProd                 OperationType = 79
	OperationTypeReduceSum                  OperationType = 80
	OperationTypeRoiAlign                   OperationType = 81
	OperationTypeRoiPooling                 OperationType = 82
	OperationTypeRSQRT                      OperationType = 83
	OperationTypeSELECT                     OperationType = 84
	OperationTypeSIN                        OperationType = 85
	OperationTypeSLICE                      OperationType = 86
	OperationTypeSPLIT                      OperationType = 87
	OperationTypeSQRT                       OperationType = 88
	OperationTypeTILE                       OperationType = 89
	OperationTypeTopkV2                     OperationType = 90
	OperationTypeTransposeConv2d            OperationType = 91
	OperationTypeUnidirectionalSequenceLstm OperationType = 92
	OperationTypeUnidirectionalSequenceRnn  OperationType = 93
	OperationTypeResizeNearestNeighbor      OperationType = 94
	OperationTypeQuantizedLstm              OperationType = 95
	OperationTypeIF                         OperationType = 96
	OperationTypeWHILE                      OperationType = 97
	OperationTypeELU                        OperationType = 98
	OperationTypeHardSwish                  OperationType = 99
	OperationTypeFILL                       OperationType = 100
	OperationTypeRANK                       OperationType = 101
	OperationTypeBatchMatmul                OperationType = 102
	OperationTypePACK                       OperationType = 103
	OperationTypeMirrorPad                  OperationType = 104
	OperationTypeREVERSE                    OperationType = 105
)

type OutputShape

type OutputShape struct {
	Dimensions   []int32
	IsSufficient bool
}

func (*OutputShape) MarshalParcel

func (s *OutputShape) MarshalParcel(
	p *parcel.Parcel,
) error

func (*OutputShape) UnmarshalParcel

func (s *OutputShape) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PerformanceInfo

type PerformanceInfo struct {
	ExecTime   float32
	PowerUsage float32
}

func (*PerformanceInfo) MarshalParcel

func (s *PerformanceInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PerformanceInfo) UnmarshalParcel

func (s *PerformanceInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PrepareModelConfig

type PrepareModelConfig struct {
	Preference            ExecutionPreference
	Priority              Priority
	DeadlineNs            int64
	ModelCache            []int32
	DataCache             []int32
	CacheToken            []byte
	CompilationHints      []TokenValuePair
	ExtensionNameToPrefix []ExtensionNameAndPrefix
}

func (*PrepareModelConfig) MarshalParcel

func (s *PrepareModelConfig) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PrepareModelConfig) UnmarshalParcel

func (s *PrepareModelConfig) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PreparedModelCallbackProxy

type PreparedModelCallbackProxy struct {
	Remote binder.IBinder
}

func NewPreparedModelCallbackProxy

func NewPreparedModelCallbackProxy(
	remote binder.IBinder,
) *PreparedModelCallbackProxy

func (*PreparedModelCallbackProxy) AsBinder

func (*PreparedModelCallbackProxy) Notify

func (p *PreparedModelCallbackProxy) Notify(
	ctx context.Context,
	status ErrorStatus,
	preparedModel IPreparedModel,
) error

type PreparedModelCallbackStub

type PreparedModelCallbackStub struct {
	Impl      IPreparedModelCallback
	Transport binder.VersionAwareTransport
}

PreparedModelCallbackStub dispatches incoming binder transactions to a typed IPreparedModelCallback implementation.

func (*PreparedModelCallbackStub) Descriptor

func (s *PreparedModelCallbackStub) Descriptor() string

func (*PreparedModelCallbackStub) OnTransaction

func (s *PreparedModelCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type PreparedModelProxy

type PreparedModelProxy struct {
	Remote binder.IBinder
}

func NewPreparedModelProxy

func NewPreparedModelProxy(
	remote binder.IBinder,
) *PreparedModelProxy

func (*PreparedModelProxy) AsBinder

func (p *PreparedModelProxy) AsBinder() binder.IBinder

func (*PreparedModelProxy) ConfigureExecutionBurst

func (p *PreparedModelProxy) ConfigureExecutionBurst(
	ctx context.Context,
) (IBurst, error)

func (*PreparedModelProxy) CreateReusableExecution

func (p *PreparedModelProxy) CreateReusableExecution(
	ctx context.Context,
	request Request,
	config ExecutionConfig,
) (IExecution, error)

func (*PreparedModelProxy) ExecuteFenced

func (p *PreparedModelProxy) ExecuteFenced(
	ctx context.Context,
	request Request,
	waitFor []int32,
	measureTiming bool,
	deadlineNs int64,
	loopTimeoutDurationNs int64,
	durationNs int64,
) (FencedExecutionResult, error)

func (*PreparedModelProxy) ExecuteFencedWithConfig

func (p *PreparedModelProxy) ExecuteFencedWithConfig(
	ctx context.Context,
	request Request,
	waitFor []int32,
	config ExecutionConfig,
	deadlineNs int64,
	durationNs int64,
) (FencedExecutionResult, error)

func (*PreparedModelProxy) ExecuteSynchronously

func (p *PreparedModelProxy) ExecuteSynchronously(
	ctx context.Context,
	request Request,
	measureTiming bool,
	deadlineNs int64,
	loopTimeoutDurationNs int64,
) (ExecutionResult, error)

func (*PreparedModelProxy) ExecuteSynchronouslyWithConfig

func (p *PreparedModelProxy) ExecuteSynchronouslyWithConfig(
	ctx context.Context,
	request Request,
	config ExecutionConfig,
	deadlineNs int64,
) (ExecutionResult, error)

type PreparedModelStub

type PreparedModelStub struct {
	Impl      IPreparedModel
	Transport binder.VersionAwareTransport
}

PreparedModelStub dispatches incoming binder transactions to a typed IPreparedModel implementation.

func (*PreparedModelStub) Descriptor

func (s *PreparedModelStub) Descriptor() string

func (*PreparedModelStub) OnTransaction

func (s *PreparedModelStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type Priority

type Priority int32
const (
	PriorityLOW    Priority = 0
	PriorityMEDIUM Priority = 1
	PriorityHIGH   Priority = 2
)

type Request

type Request struct {
	Inputs  []RequestArgument
	Outputs []RequestArgument
	Pools   []RequestMemoryPool
}

func (*Request) MarshalParcel

func (s *Request) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Request) UnmarshalParcel

func (s *Request) UnmarshalParcel(
	p *parcel.Parcel,
) error

type RequestArgument

type RequestArgument struct {
	HasNoValue bool
	Location   DataLocation
	Dimensions []int32
}

func (*RequestArgument) MarshalParcel

func (s *RequestArgument) MarshalParcel(
	p *parcel.Parcel,
) error

func (*RequestArgument) UnmarshalParcel

func (s *RequestArgument) UnmarshalParcel(
	p *parcel.Parcel,
) error

type RequestMemoryPool

type RequestMemoryPool struct {
	Tag   int32
	Pool  Memory
	Token int32
}

func (*RequestMemoryPool) GetPool

func (u *RequestMemoryPool) GetPool() (Memory, bool)

func (*RequestMemoryPool) GetToken

func (u *RequestMemoryPool) GetToken() (int32, bool)

func (*RequestMemoryPool) MarshalParcel

func (u *RequestMemoryPool) MarshalParcel(
	p *parcel.Parcel,
) error

func (*RequestMemoryPool) SetPool

func (u *RequestMemoryPool) SetPool(
	v Memory,
)

func (*RequestMemoryPool) SetToken

func (u *RequestMemoryPool) SetToken(
	v int32,
)

func (*RequestMemoryPool) UnmarshalParcel

func (u *RequestMemoryPool) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Subgraph

type Subgraph struct {
	Operands      []Operand
	Operations    []Operation
	InputIndexes  []int32
	OutputIndexes []int32
}

func (*Subgraph) MarshalParcel

func (s *Subgraph) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Subgraph) UnmarshalParcel

func (s *Subgraph) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SymmPerChannelQuantParams

type SymmPerChannelQuantParams struct {
	Scales     []float32
	ChannelDim int32
}

func (*SymmPerChannelQuantParams) MarshalParcel

func (s *SymmPerChannelQuantParams) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SymmPerChannelQuantParams) UnmarshalParcel

func (s *SymmPerChannelQuantParams) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Timing

type Timing struct {
	TimeOnDeviceNs int64
	TimeInDriverNs int64
}

func (*Timing) MarshalParcel

func (s *Timing) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Timing) UnmarshalParcel

func (s *Timing) UnmarshalParcel(
	p *parcel.Parcel,
) error

type TokenValuePair

type TokenValuePair struct {
	Token int32
	Value []byte
}

func (*TokenValuePair) MarshalParcel

func (s *TokenValuePair) MarshalParcel(
	p *parcel.Parcel,
) error

func (*TokenValuePair) UnmarshalParcel

func (s *TokenValuePair) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL