Optimizing Circular Soft Mask, Krita:GSoC

A new vectorized code  implemented using Vc library to allow SIMD operations for the generation of the Circular Soft Mask. Implementation was straightforward using internal methods declared in Vc however the gains were not as dramatic as with Gaussian Masks because one of the biggest bottlenecks is fetching from memory the predefined values rendered from the curve set by the user.

Making a plan

Phabricator task: Implement Circular Soft Mask Optim AVX
The code templates work the same as the Circular Gaussian Mask generator implementation, which I explained in my [previous post](blog, URL). Taking that into account the plan consisted in three simple steps.

  1. Understand how the scalar vector is generating the values for the Mask
  2. Port all operations to the vectorized model
  3. Test and profile the implementation.
    Read More »
Advertisements