32 : alignof(fl::uptr)) InlinedMemoryBlock {
33
34 typedef fl::uptr MemoryType;
35 enum {
36 kTotalBytes = N * sizeof(T),
37 kExtraSize =
39
40 kTotalBytesAligned = kTotalBytes + kExtraSize,
41 kBlockSize = (kTotalBytesAligned + sizeof(MemoryType) - 1) / sizeof(MemoryType),
42 };
43
45 fl::memset(mMemoryBlock, 0,
sizeof(mMemoryBlock));
46#ifdef FASTLED_TESTING
47 __data = memory();
48#endif
49 }
50
51 InlinedMemoryBlock(
const InlinedMemoryBlock &other)
FL_NOEXCEPT =
default;
52 InlinedMemoryBlock(InlinedMemoryBlock &&other)
FL_NOEXCEPT =
default;
53
54
55
56
57 MemoryType mMemoryBlock[kBlockSize];
58
60 MemoryType *
begin = &mMemoryBlock[0];
61 fl::uptr shift_up =
63 MemoryType *raw =
begin + shift_up;
65 }
66
68 const MemoryType *
begin = &mMemoryBlock[0];
69 const fl::uptr shift_up =
71 const MemoryType *raw =
begin + shift_up;
73 }
74
75#ifdef FASTLED_TESTING
76 T *__data = nullptr;
77#endif
78};
max_align_selector<(sizeof(longdouble)>sizeof(double))>::type max_align_t
constexpr T * begin(T(&array)[N]) FL_NOEXCEPT
uptr ptr_to_int(T *ptr) FL_NOEXCEPT
void * memset(void *s, int c, size_t n) FL_NOEXCEPT
To bit_cast(const From &from) FL_NOEXCEPT