Presentation is loading. Please wait.

Presentation is loading. Please wait.

Speed-up of the ring recognition algorithm Semeon Lebedev GSI, Darmstadt, Germany and LIT JINR, Dubna, Russia Gennady Ososkov LIT JINR, Dubna, Russia.

Similar presentations


Presentation on theme: "Speed-up of the ring recognition algorithm Semeon Lebedev GSI, Darmstadt, Germany and LIT JINR, Dubna, Russia Gennady Ososkov LIT JINR, Dubna, Russia."— Presentation transcript:

1 Speed-up of the ring recognition algorithm Semeon Lebedev GSI, Darmstadt, Germany and LIT JINR, Dubna, Russia Gennady Ososkov LIT JINR, Dubna, Russia

2 Speed up of the ring finder Dubna, 21.05.2009 2 Motivation Fast algorithm -> less computers requirements Possibility to use on-line reconstruction Many cores CPUs -> algorithms can be parallelized I. Kisel, March 2009, CBM Coll. Meeting

3 Speed up of the ring finder Dubna, 21.05.2009 3 Ring recognition algorithm Global search. Filter: algorithm compares all ring-candidates and chooses only good rings, rejecting clone and fake rings. Standalone ring finder. Local search of ring- candidates, based on local selection of hits and Hough Transform. Two steps: 99% 1% Time consumption

4 Speed up of the ring finder Dubna, 21.05.2009 4 Ring recognition algorithm, local search Preliminary selection of hits Histogram of ring centers HoughTransform Ellipse fitter Ring quality calculation Remove hits of found ring (only best matched hits) Ring array

5 Speed up of the ring finder Dubna, 21.05.2009 5 Time consumption Define local area and hitsHough TransformPeak finder 30%69% 1% Time consumption Hits search Arrays initialization Triple loop of ring parameters calculation peak finding in 2D and 1D array Optimize hits search and arrays sizes and dimensions, remove dynamic memory allocation Optimize calculations inside loops, decrease combinatory Where?

6 Speed up of the ring finder Dubna, 21.05.2009 6 Optimization of Hough Transform Divide hits into a several parts Make Hough Transform of each part independently First part of hits Second part of hits Hough Transform Sum up histogram

7 Speed up of the ring finder Dubna, 21.05.2009 7 Optimization of Hough Transform: SIMD and SSE2 SSE 128-bit registers can represent: sixteen 8-bit signed or unsigned chars, eight 16-bit signed or unsigned shorts, four 32-bit integers, or four 32-bit floating point variables. 128 bit register Four concurrent add operations Algorithm must work with single precision type (float)

8 Speed up of the ring finder Dubna, 21.05.2009 8 Ring finder and SIMD SIMD version of CalculateRingParameters(x[3], y[3], &xc, &yc, &r) was implemented. CalculateRingParameters(x[3], y[3], &xc, &yc, &r), where x, y, xc, yc, r are floats CalculateRingParameters(xv[3], yv[3], &xcv, &ycv, &rv), where xv, yv, xcv, ycv, rv are F32vec4

9 Speed up of the ring finder Dubna, 21.05.2009 9 Optimization and performance Time per 1 events, ms 750.4673.4632.0613.0507.4 CommentsInitial versionDouble->float Refactoring + base class for HT Remove modf() SIMD 533.6413.0299.4167.6146.1133.4 Hits presearch Remove dynamic allocation SIMD Divide hits into several parts SIMD Calc. ring params inside loop 115.697.0 Change division to multiplication RF parameters optimization Speed up factor: 7.7 Processor Intel Pentium Core2 6400 2.13 GHz

10 Speed up of the ring finder Dubna, 21.05.2009 10 Electron ring finding efficiency Au-Au central collision at 25 AGev plus 5e+ and 5e- Compact RICH geometry

11 Speed up of the ring finder Dubna, 21.05.2009 11 Summary Ring finder was significantly optimized in terms of calculation speed without loosing an efficiency Next step: –HT parameters optimization –Parallelization on multi core CPU –Continue investigation of SIMD version


Download ppt "Speed-up of the ring recognition algorithm Semeon Lebedev GSI, Darmstadt, Germany and LIT JINR, Dubna, Russia Gennady Ososkov LIT JINR, Dubna, Russia."

Similar presentations


Ads by Google