Migrate SIMD optimizations to Google Highway#123
Conversation
- Replaced manual AVX-512 and AVX2 intrinsics with Highway dynamic dispatch in SIMDUtils.h. - Replaced AVX2 histogram calculation in ImageLoader.cpp with a Highway implementation. - Removed legacy AVX2 CPU checks from main.cpp and SettingsOverlay.cpp. - Added highway to vcpkg.json dependencies. - Updated vcxproj to remove hardcoded AVX2 instruction set limits.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Replaced manual AVX-512 and AVX2 intrinsics with Highway dynamic dispatch in SIMDUtils.h. - Replaced AVX2 histogram calculation in ImageLoader.cpp with a Highway implementation. - Removed legacy AVX2 CPU checks from main.cpp and SettingsOverlay.cpp. - Added highway to vcpkg.json dependencies. - Updated vcxproj to remove hardcoded AVX2 instruction set limits.
- Wrapped ComputeHistRow in a namespace (SIMD_ImageLoader). - Used namespace qualification in HWY_DYNAMIC_DISPATCH and HWY_EXPORT to avoid C2065, C2737, and C2653 errors.
The change successfully migrates the image processing SIMD logic to Google Highway, fulfilling the task requirements.
highwaydependency tovcpkg.json.SIMDUtils.h&ImageLoader.cpp): Replaced hand-coded AVX-512/AVX2 SIMD logic forPremultiplyAlpha_BGRA,SwizzleRGBA_to_BGRA_Premul,ResizeBilinear,FindPeak_R32G32B32A32_FLOAT, andComputeHistogramFromFramewith Google Highway cross-platform abstractions.HWY_TARGETSconfiguration andHWY_STATIC_DISPATCHto automatically build optimized loops for multiple instruction sets (SSE4, AVX2, AVX-512, NEON), while safely retaining scalar fallbacks for edge-case tail lengths.IsProcessorFeaturePresent(PF_AVX2_INSTRUCTIONS_AVAILABLE)crash prompts inmain.cpp, updated theSettingsOverlaystring to indicate "Highway [Active]", and removed the MSBuild<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>constraint to allow graceful fallback to SSE4 on old CPUs.PR created automatically by Jules for task 15387880254359273585 started by @justnullname