ANeuralNetworksCompilation

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

<p>To use:<ul> <li>Create a new compilation instance by calling the {@link ANeuralNetworksCompilation_create} function.</li> <li>Set any desired properties on the compilation (for example, {@link ANeuralNetworksCompilation_setPreference}).</li> <li>Complete the compilation with {@link ANeuralNetworksCompilation_finish}.</li> <li>Use the compilation as many times as needed with {@link ANeuralNetworksExecution_create}.</li> <li>Destroy the compilation with {@link ANeuralNetworksCompilation_free} once all executions using the compilation have completed.</li></ul></p>

A compilation is completed by calling {@link ANeuralNetworksCompilation_finish}. A compilation is destroyed by calling {@link ANeuralNetworksCompilation_free}.

<p>A compilation cannot be modified once {@link ANeuralNetworksCompilation_finish} has been called on it.</p>

<p>It is the application's responsibility to make sure that only one thread modifies a compilation at a given time. It is however safe for more than one thread to use the compilation once {@link ANeuralNetworksCompilation_finish} has returned.</p>

<p>It is also the application's responsibility to ensure that there are no other uses of the compilation after calling {@link ANeuralNetworksCompilation_free}. This includes any execution object created using the compilation.</p>

Available since API level 27.

version(Android)
extern (C) @system nothrow @nogc
struct ANeuralNetworksCompilation

Meta