Summary
Architectural Decisions for Correctness and Optimization
Highlights
Intermediate results are stored in dedicated buffers, improving code clarity and preventing unintended data dependencies during convolution, despite increasing memory usage.
Gradient components use signed integer types to preserve directional information and prevent overflow, as Sobel responses can be both positive and negative.
The system architecture prioritizes vectorization through data structures and memory layouts that support contiguous memory access, minimize branching, and simplify RVV strip-mining, easing future optimization and improving scalability.
Algorithmic correctness is separated from performance optimization, with a validated scalar implementation serving as a reference to ensure that performance enhancements do not compromise functional correctness.