ONE - On-device Neural Engine
Loading...
Searching...
No Matches
CompilationBuilder Class Reference

#include <CompilationBuilder.h>

Public Member Functions

 CompilationBuilder (const ModelBuilder *model)
 
int finish ()
 
int createExecution (ExecutionBuilder **execution)
 

Detailed Description

Definition at line 26 of file CompilationBuilder.h.

Constructor & Destructor Documentation

◆ CompilationBuilder()

CompilationBuilder::CompilationBuilder ( const ModelBuilder model)

Definition at line 23 of file CompilationBuilder.cpp.

23 : mModel(model)
24{
25 VLOG(COMPILATION) << "CompilationBuilder::CompilationBuilder";
26}
#define VLOG(...)
Definition Logging.h:37

References VLOG.

Member Function Documentation

◆ createExecution()

int CompilationBuilder::createExecution ( ExecutionBuilder **  execution)

Definition at line 42 of file CompilationBuilder.cpp.

43{
44 if (!mFinished)
45 {
46 LOG(ERROR) << "ANeuralNetworksExecution_create passed an unfinished compilation";
47 *execution = nullptr;
49 }
50 *execution = new ExecutionBuilder(mModel);
52}
#define LOG(...)
Definition Logging.h:36
@ ANEURALNETWORKS_NO_ERROR
@ ANEURALNETWORKS_OUT_OF_MEMORY
@ ANEURALNETWORKS_BAD_STATE

References ANEURALNETWORKS_BAD_STATE, ANEURALNETWORKS_NO_ERROR, ANEURALNETWORKS_OUT_OF_MEMORY, and LOG.

Referenced by ANeuralNetworksExecution_create().

◆ finish()

int CompilationBuilder::finish ( )

Definition at line 28 of file CompilationBuilder.cpp.

29{
30 if (mFinished)
31 {
32 LOG(ERROR) << "ANeuralNetworksCompilation_finish called more than once";
34 }
35 // TODO validate the rest
36
37 mFinished = true;
38
40}

References ANEURALNETWORKS_BAD_STATE, ANEURALNETWORKS_NO_ERROR, and LOG.

Referenced by ANeuralNetworksCompilation_finish().


The documentation for this class was generated from the following files: