Skip to content

Concurrently readable lazy-evaluated number type #1339

@tfmk

Description

@tfmk

Hello, does libigl (or CGAL) provide a lazy-evaluated number type that allows concurrent read operations?

The program I'm working on could benefit from parallelization (potentially a 2x speedup), but when using Kernel<CGAL::Lazy_exact_nt> or CGAL::Epeck, I've noticed that concurrent read operations cause data races and crash the program.

I've tried using the number type mpq_class (as mentioned in CGAL/cgal#2685), which does not use lazy evaluation nor reference counting. As a result, the program runs without data races, but ~3 times slower (I would expect a concurrent-read-safe lazy-evaluated NT to be slower as well, but not this much).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions