Krita SoftBrush AVX Mask generation Optim.

Authored by vanyossi on Jun 13 2018, 12:48 AM.



Created SofMask AVX vectorization implementation.

This is tested using the more extensive similarity test (now naively implemented with nested loops)
The code has been Profiled using XCode-Instruments. And it shows no bottle necks on the curveData retrieval code, which worried me in principle.

About: CurvedData. we retrieve the values from a pointer using the Vc::Vector.gather method, which takes the values from a data pointer using an index as the positions to retrieve.

BenchMark shows a scalar/vectorized values around 25.3/4.3, while the gain might not be as impressive as DEfault brush, the "real world" usage shown by FreeStrokeBenchMark, shows it is fast. Compared with the Default implementation we have: Default/Vector = 5100/6800

This patch is the diferential of my branch and master.

Test Plan

Testing was performed using


Code was profiled in search for code time cloggers using XCode-Instruments Time profile. Some things were resolved using what the tool showed.

Diff Detail

R37 Krita
Lint Skipped
Unit Tests Skipped
vanyossi created this revision.Jun 13 2018, 12:48 AM
Restricted Application added a reviewer: Krita. · View Herald TranscriptJun 13 2018, 12:48 AM
Restricted Application added a project: Krita. · View Herald Transcript
dkazakov accepted this revision.Jun 15 2018, 10:08 AM
dkazakov added a subscriber: rempt.

Hi, @vanyossi!

I have tested your patch! It seem to work perfectly fine (and look fine as well). Please enter IRC so we could discuss with @rempt if it is still okay to release it in Krita 4.1 :)

This revision is now accepted and ready to land.Jun 15 2018, 10:08 AM

Okay, it should be fine to merge it into master. And for merging it into krita/4.1 we need @rempt's approval :)

13:07 < dmitryK|log> boud: are we going to merge ivanyossi's soft brush into 4.1?
13:12 <@boud> dmitryK|log: I am fine with that

Merged this diff to master

vanyossi closed this revision.Oct 11 2018, 11:14 AM