How const-me/simdintroarticle works
Project Type & Purpose
• This is a collection of three standalone demo applications (DotProduct, FloodFill, Grayscale) illustrating scalar vs. SIMD‐vector implementations.
• Each demo is a small command-line tool with its own Visual Studio solution (+ CMakeLists), containing a “main” driver, supporting modules (scalar, vector, misc), and in FloodFill’s case an I/O sub-library.
Top-Level Components
• Build System
– CMakeLists.txt at each demo root
– Visual Studio solution/project files (.sln, .vcxproj)
• Common Code
– common.h (shared declarations)
• Demo Applications
– DotProduct
– FloodFill
– Grayscale
Internal Structure of Each Demo
• Main executable (“main.cpp”)
• Scalar module (e.g. scalar.cpp, scanline.cpp)
• Vector module (e.g. vecFloat.cpp, vertical.cpp)
• Misc / helper code (misc.cpp / .hpp)
• FloodFill only: IO sub-library (stb_image, Image.cpp, Image.save.cpp) under FloodFill/IO.
Architectural Patterns & Principles
• Layered structure:
– Presentation/CLI layer (main.cpp)
– Algorithm layer (Scalar vs. Vector implementations)
– Utility layer (misc, common)
– Platform/IO layer (only in FloodFill)
• Separation of concerns: each demo isolates its I/O, core algorithm, and build scripts.
• Reuse: common.h and CMake macros can be highlighted as shared resources.
Key Technologies & Libraries
• CMake, Visual Studio Projects
• SIMD intrinsics (e.g. SSE/AVX in vecFloat.cpp)
• stb_image / stb_image_write for image I/O (FloodFill)