[Kstars-devel] RFC: KStars GSOC: data pipelining and OpenCL.

Henry de Valence hdevalence at gmail.com
Sat Apr 13 22:41:49 UTC 2013


On Sat, Apr 13, 2013 at 6:04 PM, Akarsh Simha <akarshsimha at gmail.com> wrote:

> > AFAIR conversions of coordinates is not worst bottleneck. Last time I
> checked (1
> > or 2 years ago) drawing of constellation lines and borders and
> coordinates grid
> > very much to my surprise. Any proposals to improve performance must be
> backed up
> > with profiling/benchmarks. Otherwise it's too easy to fall into trap of
> > optimizing wrong thing.
>
> Even with the USNO NOMAD catalog? That is a bit hard to believe,
> although it might be the case. With the USNO NOMAD catalog, KStars
> crawls when zoomed in on Sagittarius.
>

I'm using NOMAD and I've attached some graphs from VTune. Note that they
are all red, since we only ever use one core, of the four available on my
machine.

I tested them by running opening KStars and maximizing the number of
displayed stars, and then slewing back and forth (with no hidden objects
during slewing): http://i.imgur.com/BVxGi96.jpg

> Furthermore we can get ~10x performance boost (uneducated guess) by
> changing
> > representation of sky point. Currently it's represented by two angles and
> > conversions between different coordinate systems are quite costly: 5 or
> 6 calls
> > to trigonometry functions.
>
 > Much more convenient scheme is to store points as 3D vectors with unit
> norm and
> > some flag to distinguish between coordinate systems. In this case
> > transformations between different coordinate systems could be done using
> > quaternions and are cheap (15 multiplications). So there are no reason
> to cache
> > horizontal coordinates, they could be recalculated on the fly if
> desired.  Most
> > of the projections also become cheaper since they don't involve
> trigonometry in
> > this representation.
> >
> >
> > This has been discussed on mail list before. You can search using
> "quaternion"
> > keyword
>
> Yeah, quaternions are certainly a good idea. Not sure Henry can fit it
> into his time-line?


Yes, especially since in addition they let you work with float4, which is
much faster anyways than float1. However, moving to quaternions would be a
side-effect of moving to OpenCL, since moving to CL means moving to
quaternions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20130413/f86cbdcc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kstars_gl.png
Type: image/png
Size: 31622 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20130413/f86cbdcc/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kstars_qp.png
Type: image/png
Size: 29657 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20130413/f86cbdcc/attachment-0003.png>


More information about the Kstars-devel mailing list