Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Speeding up Intersection

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Speeding up Intersection


Chronological Thread 
  • From: Sebastien Loriot <>
  • To:
  • Subject: Re: [cgal-discuss] Speeding up Intersection
  • Date: Wed, 5 May 2021 14:29:23 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-hdrordr: A9a23:65GBjqEBp4p7YbO2pLqF7pHXdLJzesId70hD6mlaTxtJfsuE0+Wnm/oG3RH54QxhJU0Is9aGJaWGXDfg7pZz+4YcJvOPWwPhtWuuIuhZnPff6hfnHDDz8fMY6Ld4f8FFeafNJHVZreK/2gm3FN483MKKmZrDuc7yx2pgJDsaDZ1IwBx+Dm+gYylLbSlAQaE0DZ+NovdAzgDQAkg/SuSeKj07U/PYp9vN/aiWGSIuIxI88gGBgXeJxdfBYn+l9ywTWT9O3rsumFKt+2eY2oyZv/620RPa3WPIhq4m/efJ8ddfGNeKzvEcNzSEsGeVTb58UL6Pti1dmpDN1H8WlrD30nUdFvho52iUVm+4pgaF4XiY7B8er1HnjXuVm2Hqr8C8fi8zFsYpv+5kWyqcxUwnstRxlI9o/0bcjZpYChvcgD/wjuKkazha0mSzp3Qmnaooi2FHFbEZdKRaoeUkk399IdM6ECj36J8qHYBVYv3h2A==
  • Ironport-phdr: A9a23:V+wmlhRtqVj/4q1fU+zTEMliD9psok6YAWYlgqEPu/d1aq2muq7aFwnh351FslbFUM3h5u5ejKKO6ua8AD1Gu83e+yFbOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjVu8UMn4dvJKQ8xhTNr3dVZu9b2X5mKVWPkhjm+8y+5oRj8yNeu/Ig885PT6D3dLkmQLJbETorLXk76NXkuhffQwSP4GAcUngNnRpTHwfF9hD6UYzv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VDVAlqUKLZG3UbTkTTpNX9oEjFSun9WvwcLgJdxJvaeeNxYdrzgAAeLN/Tfe/Gamf0oF+eQBOBx7eCdo3vE00S2SzcDA4PlAVBpB6uBU0FHi6k5lnmInluGFboC2vp+Oh67WyhFwo6k1zMYEpm2L64vBUSgK7EI9sjm4kcsSJkkA1aWU6n1rr+BN+Jpg4nd6JZM4tV3Q==

Without seeing any code it is hard to tell. Are you using do_intersect or intersection?

Best,

Sebastien.

On 5/4/21 9:01 AM, jana jelenki ( via cgal-discuss Mailing List) wrote:
Hi,
I find this topic very interesting. I already use spatial partitioning and also OpenMP. For an average Triangle_3 Triangle_3 intersection my program needs on average 0.1ms in release mode. I also use the exact kernel. Is this the limit of the CGLAL implementation, are there any numbers or benchmarks?  Or can you squeeze there even further?
Best

Вторник, 4 мая 2021, 6:35 +03:00 от Andrew Cunningham
<>:
Hi Anish,
Since your code is a N^2 algorithm , it's not surprising that this is
taking a long time. The first thing that comes to mind is to bound
each triangle with a CGAL AABB (BoundingBox) and use CGAL AABB
algorithms to find the pairs of intersecting bounding boxes(pairs of
potential triangle intersections). That would make a huge difference
in execution time.
And once you have done that, you could loop over the intersecting
pairs and use OpenMP or other threading approaches like TBB to process
the intersecting pairs in parallel. I personally have had great
success with OpenMP tasks and CGAL.

Andrew

On Mon, May 3, 2021 at 1:17 PM Rasal Raj, Anish
<
</compose?To=anish.rasal@rwth%2daachen.de>> wrote:
>
> Hello Guys,
>
> I have recently started working with CGAL. I have a doubt.
>
>
> I am using CGAL intersection operation on a list of triangles.
currently, it takes some time to complete the information. What are
the possible ways to improve the execution time?
>
>
> Note: the list of triangles contains around 25k triangles. I have
attached a sample code with this e-mail. I am using
Exact_predicates_exact_constructions_kernel kernel.
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>

--
jana jelenki

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Archive powered by MHonArc 2.6.19+.

Top of Page