// Bundle API auto-generated header file. Do not edit!
// Glow Tools version: 2021-08-12 (78d85f1e5)

#ifndef _GLOW_BUNDLE_MNIST_NXP_H
#define _GLOW_BUNDLE_MNIST_NXP_H

#include <stdint.h>

// ---------------------------------------------------------------
//                       Common definitions
// ---------------------------------------------------------------
#ifndef _GLOW_BUNDLE_COMMON_DEFS
#define _GLOW_BUNDLE_COMMON_DEFS

// Glow bundle error code for correct execution.
#define GLOW_SUCCESS 0

// Memory alignment definition with given alignment size
// for static allocation of memory.
#define GLOW_MEM_ALIGN(size)  __attribute__((aligned(size)))

// Macro function to get the absolute address of a
// placeholder using the base address of the mutable
// weight buffer and placeholder offset definition.
#define GLOW_GET_ADDR(mutableBaseAddr, placeholderOff)  (((uint8_t*)(mutableBaseAddr)) + placeholderOff)

#endif

// ---------------------------------------------------------------
//                          Bundle API
// ---------------------------------------------------------------
// Model name: "mnist_nxp"
// Total data size: 4224 (bytes)
// Activations allocation efficiency: 1.0000
// Placeholders:
//
//   Name: "max_pooling_1_input"
//   Type: i8[S:0.003921569 O:-128][0.000,1.000]<1 x 28 x 28 x 1>
//   Size: 784 (elements)
//   Size: 784 (bytes)
//   Offset: 0 (bytes)
//
//   Name: "dense_2__1"
//   Type: i8[S:0.003921569 O:-128][0.000,1.000]<1 x 10>
//   Size: 10 (elements)
//   Size: 10 (bytes)
//   Offset: 832 (bytes)
//
// NOTE: Placeholders are allocated within the "mutableWeight"
// buffer and are identified using an offset relative to base.
// ---------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif

// Placeholder address offsets within mutable buffer (bytes).
#define MNIST_NXP_max_pooling_1_input  0
#define MNIST_NXP_dense_2__1           832

// Memory sizes (bytes).
#define MNIST_NXP_CONSTANT_MEM_SIZE     2240
#define MNIST_NXP_MUTABLE_MEM_SIZE      896
#define MNIST_NXP_ACTIVATIONS_MEM_SIZE  1088

// Memory alignment (bytes).
#define MNIST_NXP_MEM_ALIGN  64

// Bundle entry point (inference function). Returns 0
// for correct execution or some error code otherwise.
int mnist_nxp(uint8_t *constantWeight, uint8_t *mutableWeight, uint8_t *activations);

#ifdef __cplusplus
}
#endif
#endif
