mirror of https://github.com/CGAL/cgal
Moved the erase counter example to user doc + add Concurrent CC to user doc
This commit is contained in:
parent
a27e2d225f
commit
be66ce4a85
|
|
@ -107,17 +107,6 @@ element.
|
|||
Note that this is meaningful only because the
|
||||
`CGAL::Compact_container` doesn't
|
||||
deallocate elements until the destruction or clear() of the container.
|
||||
For example, this counter is used by
|
||||
the parallel 3D mesh generation engine to lazily manage the queues of bad cells:
|
||||
an element in the queue is a pair containing an cell iterator and the
|
||||
erase counter value of the cell when it has been inserted. When an element
|
||||
is popped from the queue, the algorithm checks if the current value of
|
||||
the erase counter matches the stored value. If it doesn't match, it means
|
||||
the cell has been destroyed in the meantime and it ignores it. Without this
|
||||
lazy management, each time a cell is destroyed, the algorithm has to look
|
||||
for it in the queue and remove it. This is even more useful for the parallel
|
||||
version of the meshing process, since each thread has its own queue and looking
|
||||
for a cell in all the queues would be very slow.
|
||||
|
||||
\cgalHeading{Parameters}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,17 +118,6 @@ element.
|
|||
Note that this is meaningful only because the
|
||||
`CGAL::Concurrent_compact_container` doesn't
|
||||
deallocate elements until the destruction or clear() of the container.
|
||||
For example, this counter is used by
|
||||
the parallel 3D mesh generation engine to lazily manage the queues of bad cells:
|
||||
an element in the queue is a pair containing an cell iterator and the
|
||||
erase counter value of the cell when it has been inserted. When an element
|
||||
is popped from the queue, the algorithm checks if the current value of
|
||||
the erase counter matches the stored value. If it doesn't match, it means
|
||||
the cell has been destroyed in the meantime and it ignores it. Without this
|
||||
lazy management, each time a cell is destroyed, the algorithm has to look
|
||||
for it in the queue and remove it. This is even more useful for the parallel
|
||||
version of the meshing process, since each thread has its own queue and looking
|
||||
for a cell in all the queues would be very slow.
|
||||
|
||||
\cgalHeading{Parameters}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ This used to simplify mutually pointed data structures like a halfedge
|
|||
data structure for planar maps or polyhedral surfaces (the current design
|
||||
does not need this anymore). The usual iterators are also available.
|
||||
|
||||
\section stl_compact Compact Container
|
||||
\section stl_compact Compact Containers
|
||||
|
||||
The class `Compact_container<T, Allocator>` is an \stl like container
|
||||
which provides a very compact storage for its elements. It achieves this goal
|
||||
|
|
@ -69,10 +69,35 @@ when the container used to contain lots of elements, but now has far less. In
|
|||
this case, we suggest to do a copy of the container in order to "defragment"
|
||||
the internal representation.
|
||||
|
||||
The objects stored in this container can optionally store an
|
||||
"erase counter". If it exists, i.e.\ if the object is a model of the
|
||||
`ObjectWithEraseCounter` concept, each time an object is erased from the
|
||||
container, the erase counter of the object will be incremented.
|
||||
For example, this erase counter can be exploited using the `CC_safe_handle`
|
||||
helper class, so that one can know if a handle is still pointing at the same
|
||||
element.
|
||||
Note that this is meaningful only because the container doesn't
|
||||
deallocate elements until the destruction or clear() of the container.
|
||||
For example, this counter is used by
|
||||
the parallel 3D mesh generation engine to lazily manage the queues of bad cells:
|
||||
an element in the queue is a pair containing an cell iterator and the
|
||||
erase counter value of the cell when it has been inserted. When an element
|
||||
is popped from the queue, the algorithm checks if the current value of
|
||||
the erase counter matches the stored value. If it doesn't match, it means
|
||||
the cell has been destroyed in the meantime and it ignores it. Without this
|
||||
lazy management, each time a cell is destroyed, the algorithm has to look
|
||||
for it in the queue and remove it. This is even more useful for the parallel
|
||||
version of the meshing process, since each thread has its own queue and looking
|
||||
for a cell in all the queues would be very slow.
|
||||
|
||||
This container has been developed in order to efficiently handle large data
|
||||
structures like the triangulation and halfedge data structures. It can
|
||||
probably be useful for other kinds of graphs as well.
|
||||
|
||||
The class `Concurrent_compact_container<T, Allocator>`
|
||||
provides the same features, but enables concurrency-safe
|
||||
`insert` and `erase` operations. Other operations are not concurrency-safe.
|
||||
|
||||
\section stl_multi Multiset with Extended Functionality
|
||||
|
||||
The class `Multiset<Type,Compare,Allocator>` represents a
|
||||
|
|
|
|||
Loading…
Reference in New Issue