Default and Soft Rectangular mask generator Optimization
ClosedPublic

Authored by vanyossi on Jul 24 2018, 6:34 AM.

Details

Summary

Test shows the mask generated is equal even on small sizes (not in test but locally modyfied to test for an apparent difference at small sizes)

Code seems to behave the same as the Scalar version.

Benchmark

PASS : KisMaskGeneratorBenchmark::testRectangularSoftScalarMask()
RESULT : KisMaskGeneratorBenchmark::testRectangularSoftScalarMask():

35 msecs per iteration (total: 71, iterations: 2)

PASS : KisMaskGeneratorBenchmark::testRectangularSoftVectorMask()
RESULT : KisMaskGeneratorBenchmark::testRectangularSoftVectorMask():

8.9 msecs per iteration (total: 72, iterations: 8)
Test Plan

Unittesting and benchmark as other masks before

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
vanyossi created this revision.Jul 24 2018, 6:34 AM
Restricted Application added a reviewer: Krita. · View Herald TranscriptJul 24 2018, 6:34 AM
Restricted Application added a project: Krita. · View Herald Transcript
vanyossi requested review of this revision.Jul 24 2018, 6:34 AM

Attached kpp used for test

dkazakov requested changes to this revision.Jul 25 2018, 7:45 AM

For some reason

  • testRectSoftTip()
  • testRectangularTip()

crash here because they cannot find the paintop preset. I guess testRectangularTip() should be removed atm, but testRectSoftTip() just fixed :)

This revision now requires changes to proceed.Jul 25 2018, 7:45 AM

Updated Benchmark

tests$ ./krita-ui-FreehandStrokeBenchmark

  • Start testing of FreehandStrokeBenchmark *****

Config: Using QtTest library 5.10.0, Qt 5.10.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 9.0.0 (clang-900.0.39.2) (Apple))
PASS : FreehandStrokeBenchmark::initTestCase()
QDEBUG : FreehandStrokeBenchmark::testDefaultTip() Invalid profile : "/Library/ColorSync/Profiles//WebSafeColors.icc" "Web Safe Colors"
QDEBUG : FreehandStrokeBenchmark::testDefaultTip() Cores: 1 Time: 4050 (ms)
QDEBUG : FreehandStrokeBenchmark::testDefaultTip() Cores: 2 Time: 2555 (ms)
QDEBUG : FreehandStrokeBenchmark::testDefaultTip() Cores: 3 Time: 2433 (ms)
QDEBUG : FreehandStrokeBenchmark::testDefaultTip() Cores: 4 Time: 2420 (ms)
PASS : FreehandStrokeBenchmark::testDefaultTip()
QDEBUG : FreehandStrokeBenchmark::testSoftTip() Cores: 1 Time: 5198 (ms)
QDEBUG : FreehandStrokeBenchmark::testSoftTip() Cores: 2 Time: 3150 (ms)
QDEBUG : FreehandStrokeBenchmark::testSoftTip() Cores: 3 Time: 3039 (ms)
QDEBUG : FreehandStrokeBenchmark::testSoftTip() Cores: 4 Time: 3143 (ms)
PASS : FreehandStrokeBenchmark::testSoftTip()
QDEBUG : FreehandStrokeBenchmark::testGaussianTip() Cores: 1 Time: 7238 (ms)
QDEBUG : FreehandStrokeBenchmark::testGaussianTip() Cores: 2 Time: 4313 (ms)
QDEBUG : FreehandStrokeBenchmark::testGaussianTip() Cores: 3 Time: 4949 (ms)
QDEBUG : FreehandStrokeBenchmark::testGaussianTip() Cores: 4 Time: 4437 (ms)
PASS : FreehandStrokeBenchmark::testGaussianTip()
QDEBUG : FreehandStrokeBenchmark::testRectangularTip() Cores: 1 Time: 4344 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectangularTip() Cores: 2 Time: 2739 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectangularTip() Cores: 3 Time: 2693 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectangularTip() Cores: 4 Time: 2712 (ms)
PASS : FreehandStrokeBenchmark::testRectangularTip()
QDEBUG : FreehandStrokeBenchmark::testRectGaussianTip() Cores: 1 Time: 15789 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectGaussianTip() Cores: 2 Time: 8046 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectGaussianTip() Cores: 3 Time: 6902 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectGaussianTip() Cores: 4 Time: 6573 (ms)
PASS : FreehandStrokeBenchmark::testRectGaussianTip()
QDEBUG : FreehandStrokeBenchmark::testRectSoftTip() Cores: 1 Time: 8807 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectSoftTip() Cores: 2 Time: 5032 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectSoftTip() Cores: 3 Time: 4761 (ms)
QDEBUG : FreehandStrokeBenchmark::testRectSoftTip() Cores: 4 Time: 4742 (ms)
PASS : FreehandStrokeBenchmark::testRectSoftTip()
QDEBUG : FreehandStrokeBenchmark::testStampTip() Cores: 1 Time: 16885 (ms)
QDEBUG : FreehandStrokeBenchmark::testStampTip() Cores: 2 Time: 9041 (ms)
QDEBUG : FreehandStrokeBenchmark::testStampTip() Cores: 3 Time: 8468 (ms)
QDEBUG : FreehandStrokeBenchmark::testStampTip() Cores: 4 Time: 8078 (ms)
PASS : FreehandStrokeBenchmark::testStampTip()
QDEBUG : FreehandStrokeBenchmark::testColorsmudgeDefaultTip() Cores: 1 Time: 7965 (ms)
QDEBUG : FreehandStrokeBenchmark::testColorsmudgeDefaultTip() Cores: 2 Time: 7392 (ms)
QDEBUG : FreehandStrokeBenchmark::testColorsmudgeDefaultTip() Cores: 3 Time: 7537 (ms)
QDEBUG : FreehandStrokeBenchmark::testColorsmudgeDefaultTip() Cores: 4 Time: 7764 (ms)
PASS : FreehandStrokeBenchmark::testColorsmudgeDefaultTip()
PASS : FreehandStrokeBenchmark::cleanupTestCase()
Totals: 10 passed, 0 failed, 0 skipped, 0 blacklisted, 200992ms

  • Finished testing of FreehandStrokeBenchmark *****
vanyossi updated this revision to Diff 38680.Jul 28 2018, 7:14 PM
vanyossi retitled this revision from Soft Rectangular mask generator Optimization to Default and Soft Rectangular mask generator Optimization.
vanyossi edited the test plan for this revision. (Show Details)

Includes

Soft Rectangular mask optimization
Default Rectangular Optimization

Attached binary files for tests

dkazakov accepted this revision.Jul 30 2018, 3:40 PM

Hi, @vanyossi!

The patch looks and works fine, please merge! :)

libs/image/tests/kis_mask_similarity_test.cpp
79

Looks like something is forgotten here :)

This revision is now accepted and ready to land.Jul 30 2018, 3:40 PM
vanyossi closed this revision.Oct 11 2018, 11:13 AM