aurorafw.android.platform.neuralnetworks

Undocumented in source.

Members

Aliases

ANeuralNetworksOperationType
alias ANeuralNetworksOperationType = int

@file aurorafw/android/platform/neuralnetworks.d

Enums

ANEURALNETWORKS_MAX_SIZE_OF_IMMEDIATELY_COPIED_VALUES
anonymousenum ANEURALNETWORKS_MAX_SIZE_OF_IMMEDIATELY_COPIED_VALUES

For {@link ANeuralNetworksModel_setOperandValue}, values with a length smaller or equal to this will be immediately copied into the model. The size is in bytes.

FuseCode
enum FuseCode

Fused activation function types.

OperandCode
enum OperandCode

Operand types.

OperationCode
enum OperationCode

Operation types.

PaddingCode
enum PaddingCode

Implicit padding algorithms.

PreferenceCode
enum PreferenceCode

Execution preferences.

ResultCode
enum ResultCode

Result codes.

Functions

ANeuralNetworksCompilation_create
int ANeuralNetworksCompilation_create(ANeuralNetworksModel* model, ANeuralNetworksCompilation** compilation)

Create a {@link ANeuralNetworksCompilation} to compile the given model.

ANeuralNetworksCompilation_finish
int ANeuralNetworksCompilation_finish(ANeuralNetworksCompilation* compilation)

Indicate that we have finished modifying a compilation. Required before calling {@link ANeuralNetworksExecution_create}.

ANeuralNetworksCompilation_free
void ANeuralNetworksCompilation_free(ANeuralNetworksCompilation* compilation)

Destroy a compilation.

ANeuralNetworksCompilation_setPreference
int ANeuralNetworksCompilation_setPreference(ANeuralNetworksCompilation* compilation, int preference)

Sets the execution preference.

ANeuralNetworksEvent_free
void ANeuralNetworksEvent_free(ANeuralNetworksEvent* event)

Destroys the event.

ANeuralNetworksEvent_wait
int ANeuralNetworksEvent_wait(ANeuralNetworksEvent* event)

Waits until the execution completes.

ANeuralNetworksExecution_create
int ANeuralNetworksExecution_create(ANeuralNetworksCompilation* compilation, ANeuralNetworksExecution** execution)

Create a {@link ANeuralNetworksExecution} to apply the given compilation. This only creates the object. Computation is only performed once {@link ANeuralNetworksExecution_startCompute} is invoked.

ANeuralNetworksExecution_free
void ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution)

Destroy an execution.

ANeuralNetworksExecution_setInput
int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int index, const(ANeuralNetworksOperandType)* type, const(void)* buffer, size_t length)

Associate a user buffer with an input of the model of the {@link ANeuralNetworksExecution}.

ANeuralNetworksExecution_setInputFromMemory
int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution* execution, int index, const(ANeuralNetworksOperandType)* type, const(ANeuralNetworksMemory)* memory, size_t offset, size_t length)

Associate part of a memory object with an input of the model of the {@link ANeuralNetworksExecution}.

ANeuralNetworksExecution_setOutput
int ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution, int index, const(ANeuralNetworksOperandType)* type, void* buffer, size_t length)

Associate a user buffer with an output of the model of the {@link ANeuralNetworksExecution}.

ANeuralNetworksExecution_setOutputFromMemory
int ANeuralNetworksExecution_setOutputFromMemory(ANeuralNetworksExecution* execution, int index, const(ANeuralNetworksOperandType)* type, const(ANeuralNetworksMemory)* memory, size_t offset, size_t length)

Associate part of a memory object with an output of the model of the {@link ANeuralNetworksExecution}.

ANeuralNetworksExecution_startCompute
int ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution* execution, ANeuralNetworksEvent** event)

Schedule evaluation of the execution.

ANeuralNetworksMemory_createFromFd
int ANeuralNetworksMemory_createFromFd(size_t size, int protect, int fd, size_t offset, ANeuralNetworksMemory** memory)

Creates a shared memory object from a file descriptor.

ANeuralNetworksMemory_free
void ANeuralNetworksMemory_free(ANeuralNetworksMemory* memory)

Delete a memory object.

ANeuralNetworksModel_addOperand
int ANeuralNetworksModel_addOperand(ANeuralNetworksModel* model, const(ANeuralNetworksOperandType)* type)

Add an operand to a model.

ANeuralNetworksModel_addOperation
int ANeuralNetworksModel_addOperation(ANeuralNetworksModel* model, ANeuralNetworksOperationType type, uint inputCount, const(uint)* inputs, uint outputCount, const(uint)* outputs)

Add an operation to a model.

ANeuralNetworksModel_create
int ANeuralNetworksModel_create(ANeuralNetworksModel** model)

Create an empty {@link ANeuralNetworksModel}.

ANeuralNetworksModel_finish
int ANeuralNetworksModel_finish(ANeuralNetworksModel* model)

Indicate that we have finished modifying a model. Required before calling {@link ANeuralNetworksCompilation_create}.

ANeuralNetworksModel_free
void ANeuralNetworksModel_free(ANeuralNetworksModel* model)

Destroy a model.

ANeuralNetworksModel_identifyInputsAndOutputs
int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model, uint inputCount, const(uint)* inputs, uint outputCount, const(uint)* outputs)

Specifies which operands will be the model's inputs and outputs. Every model must have at least one input and one output.

ANeuralNetworksModel_relaxComputationFloat32toFloat16
int ANeuralNetworksModel_relaxComputationFloat32toFloat16(ANeuralNetworksModel* model, bool allow)

Specifies whether {@link ANEURALNETWORKS_TENSOR_FLOAT32} is allowed to be calculated with range and/or precision as low as that of the IEEE 754 16-bit floating-point format. By default, {@link ANEURALNETWORKS_TENSOR_FLOAT32} must be calculated using at least the range and precision of the IEEE 754 32-bit floating-point format.

ANeuralNetworksModel_setOperandValue
int ANeuralNetworksModel_setOperandValue(ANeuralNetworksModel* model, int index, const(void)* buffer, size_t length)

Sets an operand to a constant value.

ANeuralNetworksModel_setOperandValueFromMemory
int ANeuralNetworksModel_setOperandValueFromMemory(ANeuralNetworksModel* model, int index, const(ANeuralNetworksMemory)* memory, size_t offset, size_t length)

Sets an operand to a value stored in a memory object.

Structs

ANeuralNetworksCompilation
struct ANeuralNetworksCompilation

ANeuralNetworksCompilation is an opaque type that can be used to compile a machine learning model.

ANeuralNetworksEvent
struct ANeuralNetworksEvent

ANeuralNetworksEvent is an opaque type that represents an event that will be signaled once an execution completes.

ANeuralNetworksExecution
struct ANeuralNetworksExecution

ANeuralNetworksExecution is an opaque type that can be used to apply a machine learning model to a set of inputs.

ANeuralNetworksMemory
struct ANeuralNetworksMemory

ANeuralNetworksMemory is an opaque type that represents memory.

ANeuralNetworksModel
struct ANeuralNetworksModel

ANeuralNetworksModel is an opaque type that contains a description of the mathematical operations that constitute the model.

ANeuralNetworksOperandType
struct ANeuralNetworksOperandType

ANeuralNetworksOperandType describes the type of an operand. This structure is used to describe both scalars and tensors.

Meta