Noodle
Loading...
Searching...
No Matches
noodle_internal.cpp File Reference

Private shared globals and helpers for Noodle implementation files. More...

#include "noodle_internal.h"
Include dependency graph for noodle_internal.cpp:

Functions

uint16_t noodle_do_conv1d (float *input, float *kernel, uint16_t W, uint16_t K, float *output, uint16_t P, uint16_t S)
 Accumulate one 1D convolution into an output sequence.
uint16_t noodle_do_pooling1d (float *input, uint16_t W, uint16_t K, uint16_t S, const char *fn)
 Apply valid 1D max pooling and write to a file.
uint16_t noodle_do_pooling1d (float *input, uint16_t W, uint16_t K, uint16_t S, NDL_File &fo)
 Apply valid 1D max pooling and write to an open file.
uint16_t noodle_do_pooling1d (const float *input, uint16_t W, uint16_t K, uint16_t S, float *output)
 Apply valid 1D pooling and write to memory.
float noodle_get_padded_x (byte *grid, int16_t i, int16_t j, int16_t W, int16_t P0, int16_t P1)
 Read a byte grid sample with asymmetric zero padding.
float noodle_get_padded_x (float *grid, int16_t i, int16_t j, int16_t W, int16_t P0, int16_t P1)
 Read a float grid sample with asymmetric zero padding.
uint16_t noodle_do_bias (float *output, float bias, uint16_t n)
 Add bias to a square output map and apply ReLU.
uint16_t noodle_do_pooling (const float *input, uint16_t W, uint16_t K, uint16_t S, const char *fn)
 Apply 2D pooling and write to a file.
uint16_t noodle_do_pooling (const float *input, uint16_t W, uint16_t K, uint16_t S, NDL_File &fo)
 Apply 2D pooling and write to an open file.
uint16_t noodle_do_pooling (const float *input, uint16_t W, uint16_t K, uint16_t S, float *output)
 Apply 2D pooling and write to memory.
uint16_t noodle_do_conv (byte *grid, const float *kernel, uint16_t K, uint16_t W, float *output, uint16_t P, uint16_t S)
 Accumulate one byte-input 2D convolution plane.
uint16_t noodle_do_conv (float *grid, const float *kernel, uint16_t K, uint16_t W, float *output, uint16_t P, uint16_t S)
 Accumulate one float-input 2D convolution plane.
void noodle_reset_buffer (float *buffer, uint16_t n)
 Clear a float buffer.
uint16_t noodle_do_bias_act (float *output, float bias, uint16_t n, Activation act)
 Add bias to a square output map and apply the requested activation.
uint16_t noodle_do_conv_transpose (float *input, const float *kernel, uint16_t K, uint16_t W, float *output, uint16_t P, uint16_t S, uint16_t OP)
 Accumulate one 2D transpose-convolution plane.
uint16_t noodle_compute_V (uint16_t K, uint16_t W, uint16_t P, uint16_t S)
 Compute 2D convolution output width.
uint16_t noodle_compute_V_and_P (uint16_t K, uint16_t W, uint16_t P, uint16_t S, uint16_t &P0, uint16_t &P1)
 Compute 2D convolution output width and effective asymmetric padding.
uint16_t noodle_valid_max_pool (float *inplace, uint16_t W, uint16_t C, const Pool &pool)
 Apply valid max pooling to a packed channel-first tensor in place.
uint16_t noodle_compute_Vt (uint16_t K, uint16_t W, uint16_t P, uint16_t S, uint16_t OP)
 Compute transpose-convolution output width.
uint16_t noodle_compute_Vt_and_P (uint16_t K, uint16_t W, uint16_t P, uint16_t S, uint16_t OP, uint16_t &P0, uint16_t &P1)
 Compute transpose-convolution output width and effective padding.
void noodle_copy_kernel_progmem (const float *w, uint32_t base, uint16_t K, float *kernel)
 Copy one square kernel from near-PROGMEM into RAM.

Variables

SdFat NOODLE_FS
 SdFat filesystem object used by the SdFat backend.
NDL_File fw
 Shared weight file handle used by streaming layer implementations.
NDL_File fb
 Shared bias file handle used by streaming layer implementations.
NDL_File fo
 Shared output file handle used by streaming layer implementations.
NDL_File fi
 Shared input file handle used by streaming layer implementations.
void * temp_buff1 = 0
 Global input scratch buffer, either Noodle-owned or caller-owned.
void * temp_buff2 = 0
 Global accumulation scratch buffer, either Noodle-owned or caller-owned.
size_t temp_buff1_capacity = 0
size_t temp_buff2_capacity = 0

Detailed Description

Private shared globals and helpers for Noodle implementation files.

Variable Documentation

◆ fb

NDL_File fb

Shared bias file handle used by streaming layer implementations.

◆ fi

NDL_File fi

Shared input file handle used by streaming layer implementations.

◆ fo

NDL_File fo

Shared output file handle used by streaming layer implementations.

◆ fw

NDL_File fw

Shared weight file handle used by streaming layer implementations.

◆ NOODLE_FS

SdFat NOODLE_FS

SdFat filesystem object used by the SdFat backend.

◆ temp_buff1

void* temp_buff1 = 0

Global input scratch buffer, either Noodle-owned or caller-owned.

◆ temp_buff1_capacity

size_t temp_buff1_capacity = 0

◆ temp_buff2

void* temp_buff2 = 0

Global accumulation scratch buffer, either Noodle-owned or caller-owned.

◆ temp_buff2_capacity

size_t temp_buff2_capacity = 0