FastLED 3.9.15
Loading...
Searching...
No Matches

◆ FASTLED_STACK_ARRAY

#define FASTLED_STACK_ARRAY ( TYPE,
NAME,
SIZE )
Value:
TYPE NAME[SIZE]; \
fl::memset(NAME, 0, sizeof(TYPE) * (SIZE))

Stack-allocated array with automatic zero-initialization.

Creates either a VLA (variable length array) or emulates one using alloca() depending on compiler capabilities. The allocated array is automatically zero-initialized.

Parameters
TYPEThe element type
NAMEThe variable name
SIZEThe number of elements
Note
This macro must be used at statement level. Use it like: FASTLED_STACK_ARRAY(uint8_t, buffer, size);

Definition at line 32 of file alloca.h.

32#define FASTLED_STACK_ARRAY(TYPE, NAME, SIZE) \
33 TYPE NAME[SIZE]; \
34 fl::memset(NAME, 0, sizeof(TYPE) * (SIZE))

Referenced by fl::audio::fft::Context::computeLinearBins(), fl::audio::fft::Context::computeLogRebinNormFactors(), fill_2dnoise16(), fill_2dnoise8(), fill_noise16(), fill_noise8(), fl::audio::fft::Context::initHybrid(), fl::audio::fft::Context::initOctaveWise(), fl::audio::fft::Context::runNaive(), and fl::audio::fft::Context::runOctaveWise().