FastLED 3.9.15
Loading...
Searching...
No Matches
perlin_s16x16_simd.h
Go to the documentation of this file.
1#pragma once
2
3// 2D Perlin noise SIMD implementation using s16x16 fixed-point arithmetic
4// Extracted from animartrix_detail.hpp for testing and debugging
5//
6// SIMD batch version: Process 4 Perlin evaluations in parallel
7// Uses FastLED SIMD abstraction layer for vectorizable operations
8
10#include "fl/math/simd.h"
11
12namespace fl {
13
14
16 static constexpr int HP_BITS = perlin_s16x16::HP_BITS;
17 static constexpr fl::i32 HP_ONE = perlin_s16x16::HP_ONE;
18 static constexpr int FP_BITS = fl::s16x16::FRAC_BITS;
19 static constexpr fl::i32 FP_ONE = static_cast<fl::i32>(1) << FP_BITS;
20
21 // SIMD batch version: Process 4 Perlin evaluations in parallel.
22 // Takes SIMD registers directly — the caller loads/stores as needed.
25 const fl::i32 *fade_lut, const fl::u8 *perm);
26};
27
28} // namespace fl
static constexpr int FRAC_BITS
Definition s16x16.h:22
platforms::simd_u32x4 simd_u32x4
Definition s16x16x4.h:27
unsigned char u8
Definition s16x16x4.h:132
Base definition for an LED controller.
Definition crgb.hpp:179
Umbrella header for SIMD subsystem.
static constexpr fl::i32 FP_ONE
static constexpr int HP_BITS
static constexpr int FP_BITS
static constexpr fl::i32 HP_ONE
static fl::simd::simd_u32x4 pnoise2d_raw_simd4_vec(fl::simd::simd_u32x4 nx_vec, fl::simd::simd_u32x4 ny_vec, const fl::i32 *fade_lut, const fl::u8 *perm)
static constexpr fl::i32 HP_ONE
static constexpr int HP_BITS