Laurent Rineau
642078f65d
Missing #include <CGAL/use.h>
2020-07-22 09:47:43 +02:00
Laurent Rineau
8a7d3fa21e
CGAL_Core no longer needs Boost.Thread
2020-07-21 17:32:30 +02:00
Laurent Rineau
bd172e5aa4
Call init_CORE() before any thread_local CORE static variables
...
The reason is actually simple:
- `ExprRep::approx` may have to create a `Real` variable of a `double`,
- that variable needs `MemoryPool<RealDouble>`.
If, for example, `Expr::getZero()` is called first, then the static
variable representing that zero is created first, and will be
destroyed last.
But if, during the computation, CORE needs to call `approx` on that
zero, then the `MemoryPool<RealDouble>` is created. At the end of the
program execution, at the destruction of static variables, the static
variable for `MemoryPool<RealDouble>` is destroyed. The static
variable of `Expr::getZero()` is destroyed last. ... But, as its
`approx` function was called, the destructor of that variable may need
`MemoryPool<RealDouble>` to call `free`, but that pool has already
been destroyed!
The function `init_CORE()`, if called *before* any thread-local local
static variable is created, ensured that `MemoryPool<RealDouble>` is
created first, and then destroyed last during the execution of the
program (or thread).
2020-07-21 17:15:45 +02:00
Sébastien Loriot
6c94c1501e
Merge remote-tracking branch 'cgal/releases/CGAL-4.14-branch'
2020-05-05 14:40:55 +02:00
Sébastien Loriot
0ebe5350db
fix interval
...
Fix suggested by Stefan Schirra following recommendation in Stefan Funke's Diplomarbeit
2020-04-30 11:12:12 +02:00
Maxime Gimeno
627a7b29be
Fix warnings
2020-04-27 17:20:50 +02:00
Sébastien Loriot
0779373835
extra run of the script to remove tabs and trailing whitespaces
...
right after the merge of 4.14 release branch
+ manual fix on one line in:
* Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
* .travis/generate_travis.sh
2020-03-26 14:16:06 +01:00
Sébastien Loriot
590612a563
run the script to remove tabs and trailing whitespaces
2020-03-26 13:25:16 +01:00
Sébastien Loriot
26fb266410
Remove license notice in CORE headers
...
also fix some SPDX tags
2019-10-19 16:28:33 +02:00
Sébastien Loriot
9bd9c68b83
update LGPL[23]+ and GPL[23]+ SPDX tags
...
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Laurent Rineau
d3b9d89596
Merge pull request #4013 from lrineau/CGAL_Core-no_need_for_Boost.Thread-GF
...
Remove the need for Boost.Thread (but for CGAL_Core and gcc<9.1)
2019-07-10 14:22:53 +02:00
Laurent Rineau
c0ba28f80a
Merge branch 'releases/CGAL-4.14-branch'
2019-07-03 11:18:20 +02:00
Laurent Rineau
e79bfd5d03
Merge branch 'releases/CGAL-4.13-branch' into releases/CGAL-4.14-branch
2019-07-03 11:10:03 +02:00
Laurent Rineau
dca6b5c19e
Strange patch that fixes the remaining bugs
...
https://github.com/CGAL/cgal/pull/4013#issuecomment-507291311
Because of two constructions in Algebraic_curve_kernel_2 and
Hyperbolic_octagon_translation, the assertion "!blocks.empty()" from
`<CGAL/CORE/MemoryPool.h>` was triggered during the destruction of
thread-local objects.
This strange patch ensures that the order of creation of thread-local
object is right, so the order of destruction is right as well.
2019-07-02 10:53:09 +02:00
Laurent Rineau
9eed06477d
Use the function-local thread_local memPool, but for gcc<9.1
2019-06-26 15:52:39 +02:00
Laurent Rineau
aa0a9c848d
Remove 'using namespace std' from namespaces
2019-06-26 15:16:36 +02:00
Laurent Rineau
2ce7800239
Unfortunately gcc < 9.1 has bug with thread_local that impact CGAL
2019-06-24 14:27:20 +02:00
Laurent Rineau
e260ea1dd4
C++11: remove the need for Boost.Thread, even with CGAL_Core
2019-06-18 15:06:23 +02:00
Andreas Fabri
4581f1b7a8
Morte replacements
2019-06-05 08:39:55 +02:00
Mael Rouxel-Labbé
2848158354
Fix typos
2019-05-20 08:54:04 +02:00
Laurent Rineau
90782d4b7f
Revert the merge of two pull-requests that target CGAL-4.14-branch
...
- Revert "Merge pull request #3857 from MaelRL/CGAL-Fix_duplicate_non_manifold_vertices-GF"
- Revert "Merge pull request #3898 from lrineau/Mesh_3-stop_during_protection-lrineau"
2019-05-14 17:50:45 +02:00
Laurent Rineau
8e872081fc
Merge pull request #3898 from lrineau/Mesh_3-stop_during_protection-lrineau
...
Mesh_3 `Protect_edges_sizing_field`: handle the `stop` Boolean
# Conflicts:
# .travis/build_package.sh
# Installation/cmake/modules/CGALConfig_binary.cmake.in
# Installation/cmake/modules/CGALConfig_install.cmake.in
# Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake
# Installation/lib/cmake/CGAL/CGALConfig.cmake
# Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h
# Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt
# Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt
2019-05-14 16:18:24 +02:00
Laurent Rineau
870ff45168
Merge pull request #3886 from lrineau/CGAL-Adapt_to_Boost_1.70-GF
...
Adapt to Boost 1.70
2019-05-07 15:48:03 +02:00
Laurent Rineau
aebb058b58
Merge pull request #3886 from lrineau/CGAL-Adapt_to_Boost_1.70-GF
...
Adapt to Boost 1.70
2019-05-07 15:45:00 +02:00
Laurent Rineau
5e65027d46
I did not know clang defines __GNUC__
...
The patch now uses `BOOST_GCC`, to avoid including clang in the
conditional.
2019-04-29 09:52:14 +02:00
Sébastien Loriot
5bac189dc3
remove cpp11 workaround for CORE
2019-03-29 10:41:50 +01:00
Andreas Fabri
f1e1b57fa4
Remove call of setprecision() as it has no effect
2019-01-31 19:00:14 +01:00
Sébastien Loriot
cbe02d40e7
rename ilogb macro
2018-11-06 10:59:54 +01:00
Laurent Rineau
2d7dcb0c39
Merge pull request #3166 from sloriot/Core-bigfloat_from_ui
...
Add missing constructor for unsigned int
2018-06-14 17:36:49 +02:00
Sébastien Loriot
7511b3e1b2
add missing constructor for unsigned int
2018-06-12 12:59:51 +02:00
Sébastien Loriot
ef09d971e2
undo unwanted change in 777d305
2018-06-11 22:09:37 +02:00
Andreas Fabri
777d3057d9
Undef the macros at the end, as they are not identical (one has an EXPORT)
2018-05-23 11:48:58 +02:00
Andreas Fabri
b33ab791e1
Disable a warning. Fix an allocator call
2018-05-15 15:37:51 +02:00
Laurent Rineau
78e7060525
Merge pull request #2712 from afabri/CGAL-VC+warnlevel_4-GF
...
Deal with VC++ warnings of level /W4
2018-02-19 14:27:06 +01:00
Andreas Fabri
d38fea5ffe
Add missing #include
2018-02-12 09:44:10 +00:00
Andreas Fabri
abe933a684
Address the warning concerning SCL_SECURE for VC++
2018-02-09 15:00:14 +00:00
Andreas Fabri
c9728abdee
build CORE lib without warnings
2018-02-01 10:52:44 +00:00
Andreas Fabri
6cc385c6ec
Number_types
2018-01-17 15:47:18 +00:00
Andreas Fabri
cbf3a16471
libs compile without warning
2018-01-17 15:02:32 +00:00
Laurent Rineau
3c6640bf59
Merge pull request #1436 from lrineau/CGAL-new_cmake-GF
...
Renewal of CMake scripts: header-only, ctest, CMake>=3.1
# Conflicts:
# Installation/config/testfiles/CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG.cpp
2017-12-05 18:20:05 +01:00
Laurent Rineau
26fe3df693
Try to fix link errors on Windows
2017-11-29 11:22:30 +01:00
Laurent Rineau
bfc654c929
Change the exports of CGAL_Core, to fix a link error
2017-11-28 17:59:18 +01:00
Sébastien Loriot
8cdfad0d08
add missing URL and Id tags
2017-11-15 22:58:57 +01:00
Sébastien Loriot
6b568a8f62
add SPDX identifiers for Core
2017-11-12 10:21:35 +01:00
Sébastien Loriot
0698f79aff
add SPDX identifier for files under the LGPL-3+ license
2017-11-12 10:17:50 +01:00
Laurent Rineau
8dfa4f4dc8
Fix link error of demo/Polyhedron, in Debug and CGAL_HEADER_ONLY
2017-07-27 17:28:21 +02:00
Andreas Fabri
cc3c4c93ba
CGAL_Core: make it less verbose to fix #1915
2017-04-03 12:36:43 +02:00
Laurent Rineau
6d79ebdaf8
Merge pull request #1916 from sloriot/Core-bug_fix_large_MSB
...
Fix Expr computation when a Node in the tree has a large MSB bound
2017-02-21 17:50:21 +01:00
Laurent Rineau
784ce69bea
Merge pull request #1923 from sloriot/CORE-Expr_approx_bound
...
Make sure the approximation exceeds the separation bound
2017-02-21 17:50:08 +01:00
Sébastien Loriot
aab162e81c
use a thighter approximation
2017-02-21 17:30:24 +01:00
Sébastien Loriot
3dc5f7d800
make sure the approximation exceeds the separation bound
2017-02-21 17:12:56 +01:00
Sébastien Loriot
e9cfce4f45
Do the approximation computation even if MSB bounds are too large
...
extLong manages overflow and underflow, this patch forces the
approximation to be done even if the bounds are too large
2017-02-20 18:15:49 +01:00
Laurent Rineau
b73a88babc
CGAL_Core MemoryPool<T> will always use Boost.Thread with g++
...
Because of bug in gcc, even if the C++11 `thread_local` keyword can be
used, it cannot be used for the TLS static member of the class template
`MemoryPool<T>`. That triggers a bug in gcc (tested with g++ 6.3.1):
```
.../include/CGAL/CORE/MemoryPool.h:113:25: error: redefinition of 'bool __tls_guard'
MemoryPool<T, nObjects> MemoryPool<T, nObjects>::memPool;
^~~~~~~~~~~~~~~~~~~~~~~
.../include/CGAL/CORE/MemoryPool.h:113:25: note: 'bool __tls_guard' previously declared here
.../include/CGAL/CORE/MemoryPool.h:113: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/cc4xCWuR.out file, please attach this to your bugreport.
```
The bug seems to be from g++ >= 5:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54948
2017-02-08 17:05:13 +01:00
Laurent Rineau
4e1b250b9c
Followup for PR #1744
...
The commit 6c77740485 was not complete:
> CORE MemoryPool<T> has to be destroyed last
>
> If Boost implementation of thread local storage is used, the order of
> destructors is reversed, compared to C++11 `static thread_local`. The
> solution for CORE `MemoryPool<T>` is to make the static variable a
> static member of the class, and initialize the pointer only inside the
> function. That ensures that the destructor will be called after the
> destructor of local static variables.
Actually the explanation about the reverse order is not right, and even
with C++ `thread_local`, we have to ensure that the static data member
of `MemoryPool<T>` is created before any other CORE static variable.
This commit is a followup of the commit
6c7774048521d2779d1657871f476624a46d220b: even in C++11, the `memPool`
variable becomes a thread-local data member, instead of a thread-local
variable at function scope.
Fix #1844 .
2017-02-07 14:18:32 +01:00
Laurent Rineau
ee21a5a077
Merge pull request #1744 from afabri/CORE-static-GF
...
CGAL_CORE: Make it thread safe
2017-01-12 11:10:38 +01:00
Laurent Rineau
6c77740485
CORE MemoryPool<T> has to be destroyed last
...
If Boost implementation of thread local storage is used, the order of
destructors is reversed, compared to C++11 `static thread_local`. The
solution for CORE `MemoryPool<T>` is to make the static variable a
static member of the class, and initialize the pointer only inside the
function. That ensures that the destructor will be called after the
destructor of local static variables.
2017-01-10 16:27:44 +01:00
Andreas Fabri
e869afa8af
bugfix
2017-01-10 14:09:27 +01:00
Andreas Fabri
7b6e4a27ca
Even read only static const variables must be thread local
...
as otherwise their destructor is called after the destructor
of the CORE memory pool.
2017-01-10 13:53:50 +01:00
Andreas Fabri
46c6ea1f3f
Deal with CGAL_NO_ATOMIC
2017-01-09 15:08:42 +01:00
Sébastien Loriot
e696a857f9
use direct initialization also in header-only mode
2017-01-09 15:08:42 +01:00
Sébastien Loriot
109f021a3a
use direct initialization
2017-01-09 15:08:42 +01:00
Andreas Fabri
185208646a
fixed and tested
2017-01-09 15:08:42 +01:00
Andreas Fabri
f1a39ef43f
No need for static
2017-01-09 15:08:42 +01:00
Andreas Fabri
8972c92a14
make Memory pool thread safe
2017-01-09 15:08:42 +01:00
Andreas Fabri
1b2fcdb82a
make static variable for pretty printing const
2017-01-09 15:08:42 +01:00
Andreas Fabri
fab26b5a05
make variables atomic
2017-01-09 15:08:42 +01:00
Andreas Fabri
1d0ec5bd38
WIP: make variables atomic; it no longer compiles :(
2017-01-09 15:08:42 +01:00
Andreas Fabri
8faf83433b
declare constants const
2017-01-09 15:08:42 +01:00
Andreas Fabri
4b79bd484f
NT_TYPE is not used anywhere
2017-01-09 15:08:42 +01:00
Andreas Fabri
36b34b3e63
declare constants const
2017-01-09 15:08:42 +01:00
Andreas Fabri
e0d026d552
polyWilkinson is not used anywhere
2017-01-09 15:08:42 +01:00
Andreas Fabri
4f71d02c6f
Remove random functions as they are not in the CGAL Core API
2017-01-09 15:08:42 +01:00
Andreas Fabri
5321a90c27
Remove the geometry files
2017-01-09 15:08:42 +01:00
Andreas Fabri
fa7217c682
declare constants const
2017-01-09 15:08:41 +01:00
Andreas Fabri
bb033e2037
Remove export declaration for member functions as the class is exported. Suppress VC++ warnings
2016-09-22 12:11:35 +02:00
Laurent Rineau
54fe1b8b56
CGAL_Core: fix -fvisibility issues on Linux
2016-09-14 16:12:02 +02:00
Sébastien Loriot
ff1b240a37
replace assert by CGAL_assertion in CGAL code
2016-08-25 11:12:17 +02:00
Laurent Rineau
68df272c01
Fix CORE header-only
2016-03-09 18:53:58 +01:00
Andreas Fabri
42aa03596f
We delete blocks if all T's are on the internal free list
2016-01-28 10:35:49 +01:00
Andreas Fabri
8f63e80716
Do not warn as it potentially covers other warnings in the testsuite
2016-01-27 15:58:24 +01:00
Andreas Fabri
d7bfb7f754
Only delete if it is possible
2016-01-27 15:47:57 +01:00
Andreas Fabri
145ac2a3d7
Replace CGAL_assertion with CGAL_warning
2016-01-26 16:57:09 +01:00
Andreas Fabri
24f6180732
Add full instantiation of ConstPolyRep<BigRat>
2016-01-22 08:40:26 +01:00
Andreas Fabri
28e9563943
Add full instantiation of ConstPolyRep<BigInt>
2016-01-22 08:28:43 +01:00
Andreas Fabri
b93783010b
fix
2016-01-21 08:40:58 +01:00
Andreas Fabri
d45ce47cc3
more exports more instantiations
2016-01-19 08:56:08 +01:00
Andreas Fabri
fa2384de63
Assure that new/delete happen BOTH inside the CORE dll
2016-01-18 17:39:15 +01:00
Andreas Fabri
a27b6f453f
fix: use ::operator delete(void*)
2016-01-16 11:52:49 +01:00
Andreas Fabri
57531cc6b5
prefix delete with :: ; debug output as I can't reproduce VC++ testsuite result locally
2016-01-16 11:22:28 +01:00
Andreas Fabri
2ffe1b211c
int -> size_t
2016-01-16 07:58:21 +01:00
Andreas Fabri
58542b3a13
Delete allocated blocks
2016-01-15 17:27:53 +01:00
Clément Jamin
0fa401d03a
Use CGAL_CORE_EXPORT instead of CGAL_EXPORT
2015-11-02 10:52:20 +01:00
Laurent Rineau
d6866de068
Fix license headers
...
Follow-up to 3293c2a68d
Fix #48
2015-10-05 13:00:07 +02:00
Guillaume Damiand
e4342d50d2
Merge remote-tracking branch 'cgal-dev/CGAL_headers_only-gdamiand_cjamin' into CGAL_headers_only-gdamiand_cjamin
2015-10-01 09:48:54 +02:00
Guillaume Damiand
cf1c0ea0ca
Merge branch 'CGAL_headers_only-gdamiand_cjamin-OLD' into CGAL_headers_only-gdamiand_cjamin
2015-10-01 09:12:55 +02:00
Andreas Fabri
1e2ff1131e
assert -> CGAL_assertion
2015-08-27 16:51:55 +02:00
Guillaume Damiand
17c0403abd
Cleanup core in cgal header only
2015-06-09 16:01:24 +02:00
Guillaume Damiand
8df781d3da
Merge branch 'CGAL_headers_only-gdamiand_cjamin-old' into CGAL_headers_only-gdamiand_cjamin
2015-06-09 14:56:48 +02:00
Andreas Fabri
3293c2a68d
Fix #48
2015-04-27 17:21:18 +02:00
Clement Jamin
ed3113f89d
Code clean-up
2015-03-16 17:01:49 +01:00
Guillaume Damiand
9c78897ba5
Merge branch 'CGAL_headers_only-gdamiand_cjamin-old' into CGAL_headers_only-gdamiand_cjamin
2015-03-16 14:00:43 +01:00
Clement Jamin
f532cbc013
Forgot 2 *_impl.h files
2014-12-15 21:57:51 +01:00
Clement Jamin
93a007616a
Header-only CGAL_Core
2014-12-15 21:34:29 +01:00
Laurent Rineau
06dac30143
Fix 'const static <type>'
...
The storage specified (static) is not allowed inside the type
specifier. It must be prefix or postfix (but not infix).
That is strange no C++ compiler gives an error on such a construction.
s/const static/static const/
2014-02-20 19:14:26 +01:00
Laurent Rineau
367314623d
Add a script to detect wrong permissions, and fix permissions
...
The script uses zsh, and lists regular files that have the
'executable' permission.
At the same time, I fix the permissions of several files.
2014-02-06 18:49:09 +01:00
Laurent Rineau
8a65c3b9c6
Fix a warning about an unused parameter
2013-12-10 18:46:28 +01:00
Andreas Fabri
4de4805e46
Fix a memory leak in BigFloat::exp2
2013-11-19 18:02:32 +01:00
Laurent Rineau
33a662f57e
bug fix: fix a typo in CORE/Timer.h
...
Detected by a warning -Wheader-guard of clang
2013-10-24 15:53:33 +02:00
Philipp Möller
8b15717ee4
Use the correct type when iterating std::strings
2012-11-14 10:25:10 +01:00
Eric Berberich
679e15c749
core is shipped with CGAL (and fix packagename to reflect libraryname)
2012-08-03 17:30:42 +00:00