+add_subdirectory(template)
add_subdirectory(logging)
--- /dev/null
+file(GLOB_RECURSE SOURCES "src/*.cc")
+
+add_library(nnapi_template SHARED ${SOURCES})
+target_include_directories(nnapi_template PUBLIC ${NNAPI_INCLUDE_DIR})
+set_target_properties(nnapi_template PROPERTIES OUTPUT_NAME neuralnetworks)
--- /dev/null
+#include <nnapi.h>
+
+#include "compilation.h"
+
+ResultCode
+ANeuralNetworksCompilation_create(ANeuralNetworksModel* model, ANeuralNetworksCompilation** compilation)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksCompilation_finish(ANeuralNetworksCompilation* compilation)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
--- /dev/null
+#ifndef __COMPILATION_H__
+#define __COMPILATION_H__
+
+struct ANeuralNetworksCompilation
+{
+};
+
+#endif
--- /dev/null
+#include <nnapi.h>
+
+#include "event.h"
+
+ResultCode
+ANeuralNetworksEvent_wait(ANeuralNetworksEvent* event)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksEvent_free(ANeuralNetworksEvent* event)
+{
+ delete event;
+ return ANEURALNETWORKS_NO_ERROR;
+}
--- /dev/null
+#ifndef __EVENT_H__
+#define __EVENT_H__
+
+struct ANeuralNetworksEvent
+{
+};
+
+#endif
--- /dev/null
+#include <nnapi.h>
+
+#include "execution.h"
+
+ResultCode
+ANeuralNetworksExecution_create(ANeuralNetworksCompilation* compilation, ANeuralNetworksExecution** execution)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution,
+ int32_t index, const ANeuralNetworksOperandType* type,
+ const void* buffer, size_t length)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution,
+ int32_t index, const ANeuralNetworksOperandType* type,
+ const void* buffer, size_t length)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution* execution, ANeuralNetworksEvent** event)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode ANeuralNetworksExecution_free(ANeuralNetworksExecution* execution)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
--- /dev/null
+#ifndef __EXECUTION_H__
+#define __EXECUTION_H__
+
+struct ANeuralNetworksExecution
+{
+};
+
+#endif
--- /dev/null
+#include <nnapi.h>
+
+#include "memory.h"
+
+ResultCode
+ANeuralNetworksMemory_createFromFd(size_t size, int protect, int fd, size_t offset, ANeuralNetworksMemory** memory)
+{
+ *memory = new ANeuralNetworksMemory{};
+
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksMemory_free(ANeuralNetworksMemory* memory)
+{
+ delete memory;
+
+ return ANEURALNETWORKS_NO_ERROR;
+}
--- /dev/null
+#ifndef __MEMORY_H__
+#define __MEMORY_H__
+
+struct ANeuralNetworksMemory
+{
+};
+
+#endif // __MEMORY_H__
--- /dev/null
+#include <nnapi.h>
+
+#include "model.h"
+
+ResultCode
+ANeuralNetworksModel_create(ANeuralNetworksModel** model)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksModel_free(ANeuralNetworksModel* model)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksModel_addOperand(ANeuralNetworksModel* model, const ANeuralNetworksOperandType *type)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksModel_setOperandValue(ANeuralNetworksModel* model,
+ int32_t index,
+ const void* buffer, size_t length)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksModel_setOperandValueFromMemory(ANeuralNetworksModel* model,
+ int32_t index,
+ const ANeuralNetworksMemory* memory, size_t offset, size_t length)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksModel_addOperation(ANeuralNetworksModel* model,
+ ANeuralNetworksOperationType type,
+ uint32_t inputCount, const uint32_t* inputs,
+ uint32_t outputCount, const uint32_t* outputs)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode
+ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel* model,
+ uint32_t inputCount, const uint32_t* inputs,
+ uint32_t outputCount, const uint32_t* outputs)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
+
+ResultCode ANeuralNetworksModel_finish(ANeuralNetworksModel* model)
+{
+ return ANEURALNETWORKS_NO_ERROR;
+}
--- /dev/null
+#ifndef __MODEL_H__
+#define __MODEL_H__
+
+struct ANeuralNetworksModel
+{
+};
+
+#endif // __MODEL_H__