diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-09-25 16:10:24 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-09-25 16:10:24 +0000 |
commit | 7386c4054e33dd28448b040b7e35cb093901f228 (patch) | |
tree | 9815ea1b648cae4c93fd3e844668b60fa1dff36f | |
parent | 7865ef2cc4abd972b2ba1eb50790912820fa2ee2 (diff) | |
parent | fa19484e31dbe0b63d50475f15e654a5e1a0c4e1 (diff) |
merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_3d_module_vincent@3908 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: ab0fe69130ba3cbb329e0e975053809180edba5d
-rw-r--r-- | CMakeGUDHIVersion.txt | 2 | ||||
-rw-r--r-- | data/points/human.COPYRIGHT | 77 | ||||
-rwxr-xr-x | scripts/create_gudhi_version.sh | 59 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/GUDHIConfig.cmake.in | 7 | ||||
-rw-r--r-- | src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h | 5 | ||||
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 5 | ||||
-rw-r--r-- | src/common/doc/installation.h | 24 | ||||
-rw-r--r-- | src/cython/CMakeLists.txt | 27 |
9 files changed, 192 insertions, 16 deletions
diff --git a/CMakeGUDHIVersion.txt b/CMakeGUDHIVersion.txt index 6811d7e1..ebaddd47 100644 --- a/CMakeGUDHIVersion.txt +++ b/CMakeGUDHIVersion.txt @@ -1,5 +1,5 @@ set (GUDHI_MAJOR_VERSION 2) -set (GUDHI_MINOR_VERSION 2) +set (GUDHI_MINOR_VERSION 3) set (GUDHI_PATCH_VERSION 0) set(GUDHI_VERSION ${GUDHI_MAJOR_VERSION}.${GUDHI_MINOR_VERSION}.${GUDHI_PATCH_VERSION}) diff --git a/data/points/human.COPYRIGHT b/data/points/human.COPYRIGHT new file mode 100644 index 00000000..cb9bdb59 --- /dev/null +++ b/data/points/human.COPYRIGHT @@ -0,0 +1,77 @@ +The human.off point cloud is available at this webpage : +http://segeval.cs.princeton.edu/ + +LICENSE +======= + +AIM@SHAPE General License for Shapes +Applicable terms +---------------- + +This is the general AIM@SHAPE license applicable to models in the +Shape Repository. It should be noted that each model is a +representation of, and is distinct from, a shape, whether physical or +imaginary. While the shape may be subject to its own terms, the terms +governing the model you are about to download are described herein. + +For some models, the owners have defined specific licenses. The terms +and conditions laid down in these licenses are in addition to the +terms prescribed here, and are to be adhered to strictly when using +such models. + +Acknowledgements +---------------- + +When including models from the Shape Repository in your website or +research work, or when using them for other purposes allowed by the +terms described herein, the AIM@SHAPE project and the model owner must +be acknowledged as the sources of the models, for example with the +phrase, "... model is provided courtesy of <model_owner> by the +AIM@SHAPE Shape Repository." + +Information on <model_owner> is present in the accompanying metadata +files and, where present, owner licenses. + +Metadata +-------- + +Each model is accompanied by its metadata file. Please keep this file +with the model as it contains important information about the +model. Please let us know if you find any errors in the metadata. + +(Im)proper use +-------------- + +Some models in the Shape Repository represent artifacts of religious, +cultural and/or historical significance, e.g. the Max Planck +model. Such models have been entrusted to the Shape Repository under +the hope that they will be used respectfully and +conscientiously. Please refrain from conducting experiments on them +that may be rash or insensitive to people's feelings. Such experiments +include, but are not limited to, morphing, animation, boolean +operations, simulations of burning, breaking, exploding and melting. + +Models in the Shape Repository are made freely available for research +and non-commercial purposes only. Use of these models for commercial +purposes is permitted only after the express approval of the Shape +Repository and the onwner has been obtained. Please contact us using +the webform on our site in this regard. + + +CITATION +======== + +If you use any part of this benchmark, please cite: +Xiaobai Chen, Aleksey Golovinskiy, and Thomas Funkhouser, +A Benchmark for 3D Mesh Segmentation +ACM Transactions on Graphics (Proc. SIGGRAPH), 28(3), 2009. + +@article{Chen:2009:ABF, + author = "Xiaobai Chen and Aleksey Golovinskiy and Thomas Funkhouser", + title = "A Benchmark for {3D} Mesh Segmentation", + journal = "ACM Transactions on Graphics (Proc. SIGGRAPH)", + year = "2009", + month = aug, + volume = "28", + number = "3" +}
\ No newline at end of file diff --git a/scripts/create_gudhi_version.sh b/scripts/create_gudhi_version.sh new file mode 100755 index 00000000..0b393980 --- /dev/null +++ b/scripts/create_gudhi_version.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +login="vrouvrea" +version="2.3.0.rc3" +cgaldir="/home/vincent/workspace/CGAL-4.11-HO/build" +cpucount=7 + + +# We start from scripts dir in the dev branch +cd .. +RELATIVEURL=`svn info . |grep -F "Relative URL:" | awk '{print $NF}'` + +if [ "$RELATIVEURL" != "^/trunk" ] +then +echo "Script must be launched in trunk and not in $RELATIVEURL" +exit +fi + +rm -rf build; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Debug -DDEBUG_TRACES=ON -DCGAL_DIR=${cgaldir} -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_BENCHMARK=ON -DPython_ADDITIONAL_VERSIONS=3 .. +cmake -DCMAKE_BUILD_TYPE=Debug . + +make -j ${cpucount} all test + +cd .. +svn st | grep -v GUDHIVersion.cmake | grep "^\?" | awk "{print \$2}" | xargs rm -rf + +svn copy svn+ssh://${login}@scm.gforge.inria.fr/svnroot/gudhi/trunk svn+ssh://${login}@scm.gforge.inria.fr/svnroot/gudhi/tags/gudhi-release-${version} \ + -m "Creating a tag of Gudhi release version ${version}." + +cd build +make user_version + +userversiondir=`find . -type d -name "*_GUDHI_${version}" | sed 's/\.\///g'` +echo "User version directory = ${userversiondir}" + +tar -czvf ${userversiondir}.tar.gz ${userversiondir} + +userdocdir=${userversiondir/GUDHI/GUDHI_DOC} +echo "User documentation directory = ${userdocdir}" +mkdir ${userdocdir} +make doxygen + +cp -R ${userversiondir}/doc/html ${userdocdir}/cpp +cd ${userversiondir} +rm -rf build; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed -DCGAL_DIR=${cgaldir} -DWITH_GUDHI_EXAMPLE=ON -DPython_ADDITIONAL_VERSIONS=3 .. +make sphinx + +cp -R cython/sphinx ../../${userdocdir}/python +cd ../.. +tar -czvf ${userdocdir}.tar.gz ${userdocdir} + +cd ${userversiondir}/build +make -j ${cpucount} all test install + +cd ../.. +actualdir=`pwd` +echo "Library is available at ${actualdir}/${userversiondir}.tar.gz" +sha256sum ${userversiondir}.tar.gz +echo "Documentation is available at ${actualdir}/${userdocdir}.tar.gz" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c60346d5..6c446104 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,7 @@ export(PACKAGE GUDHI) message("++ make install will install ${PROJECT_NAME} in the following directory : ${CMAKE_INSTALL_PREFIX}") # Create the GUDHIConfig.cmake and GUDHIConfigVersion files -set(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include") +set(CONF_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/include;${CMAKE_INSTALL_PREFIX}/include") configure_file(GUDHIConfig.cmake.in "${PROJECT_BINARY_DIR}/GUDHIConfig.cmake" @ONLY) configure_file(GUDHIConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/GUDHIConfigVersion.cmake" @ONLY) diff --git a/src/GUDHIConfig.cmake.in b/src/GUDHIConfig.cmake.in index 02b540dc..8d82f235 100644 --- a/src/GUDHIConfig.cmake.in +++ b/src/GUDHIConfig.cmake.in @@ -1,7 +1,12 @@ # - Config file for the GUDHI package # It defines the following variables # GUDHI_INCLUDE_DIRS - include directories for GUDHI +# +# Order is : +# 1. user defined GUDHI_INCLUDE_DIRS +# 2. ${CMAKE_SOURCE_DIR}/include => Where the 'cmake' has been done +# 3. ${CMAKE_INSTALL_PREFIX}/include => Where the 'make install' has been performed # Compute paths -set(GUDHI_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") +set(GUDHI_INCLUDE_DIRS "${GUDHI_INCLUDE_DIRS};@CONF_INCLUDE_DIRS@") diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index c68b5c0b..c51e47a5 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -300,7 +300,10 @@ class Persistent_cohomology { // with multiplicity. We used to sum the coefficients directly in // annotations_in_boundary by using a map, we now do it later. typedef std::pair<Column *, int> annotation_t; - thread_local std::vector<annotation_t> annotations_in_boundary; +#ifdef GUDHI_CAN_USE_CXX11_THREAD_LOCAL + thread_local +#endif // GUDHI_CAN_USE_CXX11_THREAD_LOCAL + std::vector<annotation_t> annotations_in_boundary; annotations_in_boundary.clear(); int sign = 1 - 2 * (dim_sigma % 2); // \in {-1,1} provides the sign in the // alternate sum in the boundary. diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index ee96d5a2..3ab23c12 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -1057,7 +1057,10 @@ class Simplex_tree { Dictionary_it next = siblings->members().begin(); ++next; - thread_local std::vector<std::pair<Vertex_handle, Node> > inter; +#ifdef GUDHI_CAN_USE_CXX11_THREAD_LOCAL + thread_local +#endif // GUDHI_CAN_USE_CXX11_THREAD_LOCAL + std::vector<std::pair<Vertex_handle, Node> > inter; for (Dictionary_it s_h = siblings->members().begin(); s_h != siblings->members().end(); ++s_h, ++next) { Simplex_handle root_sh = find_vertex(s_h->first); diff --git a/src/common/doc/installation.h b/src/common/doc/installation.h index d36a216f..ab54cbc7 100644 --- a/src/common/doc/installation.h +++ b/src/common/doc/installation.h @@ -2,22 +2,34 @@ * \tableofcontents * As GUDHI is a header only library, there is no need to install the library. * - * Examples of GUDHI headers inclusion can be found in \ref demos. + * Examples of GUDHI headers inclusion can be found in \ref utilities. * * \section compiling Compiling * The library uses c++11 and requires <a target="_blank" href="http://www.boost.org/">Boost</a> ≥ 1.48.0 * and <a target="_blank" href="https://www.cmake.org/">CMake</a> ≥ 3.1. * It is a multi-platform library and compiles on Linux, Mac OSX and Visual Studio 2015. * - * \subsection demos Demos and examples - * To build the demos and examples, run the following commands in a terminal: + * \subsection utilities Utilities and examples + * To build the utilities, run the following commands in a terminal: \verbatim cd /path-to-gudhi/ mkdir build cd build/ cmake .. make \endverbatim - * A list of examples is available <a href="examples.html">here</a>. + * By default, examples are disabled. You can activate their compilation with + * <a href="https://cmake.org/cmake/help/v3.0/manual/ccmake.1.html">ccmake</a> (on Linux and Mac OSX), + * <a href="https://cmake.org/cmake/help/v3.0/manual/cmake-gui.1.html">cmake-gui</a> (on Windows) or y mofifying the + * cmake command as follows : +\verbatim cmake -DWITH_GUDHI_EXAMPLE=ON .. +make \endverbatim + * A list of utilities and examples is available <a href="examples.html">here</a>. * + * \subsection libraryinstallation Installation + * To install the library (headers and activated utilities), run the following command in a terminal: + * \verbatim make install \endverbatim + * This action may require to be in the sudoer or administrator of the machine in function of the operating system and + * of <a href="https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html">CMAKE_INSTALL_PREFIX</a>. + * * \subsection testsuites Test suites * To test your build, run the following command in a terminal: * \verbatim make test \endverbatim @@ -31,6 +43,10 @@ make doxygen # You can customize the directory name by calling `cmake -DUSER_VERSION_DIR=/my/custom/folder` \endverbatim * + * \subsection helloworld Hello world ! + * The <a target="_blank" href="https://gitlab.inria.fr/GUDHI/hello-gudhi-world">Hello world for GUDHI</a> + * project is an example to help developers to make their own C++ project on top of the GUDHI library. + * * \section optionallibrary Optional third-party library * \subsection gmp GMP * The multi-field persistent homology algorithm requires GMP which is a free library for arbitrary-precision diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index 1849a6ec..09ea28f1 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -130,7 +130,11 @@ if(CYTHON_FOUND) if(CGAL_FOUND) can_cgal_use_cxx11_thread_local() if (NOT CGAL_CAN_USE_CXX11_THREAD_LOCAL_RESULT) - add_gudhi_cython_lib(${Boost_THREAD_LIBRARY}) + if(CMAKE_BUILD_TYPE MATCHES Debug) + add_gudhi_cython_lib("${Boost_THREAD_LIBRARY_DEBUG}") + else() + add_gudhi_cython_lib("${Boost_THREAD_LIBRARY_RELEASE}") + endif() set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ") endif() # Add CGAL compilation args @@ -139,22 +143,26 @@ if(CYTHON_FOUND) set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_HEADER_ONLY', ") else(CGAL_HEADER_ONLY) add_gudhi_debug_info("CGAL version ${CGAL_VERSION}") - add_gudhi_cython_lib(${CGAL_LIBRARY}) + add_gudhi_cython_lib("${CGAL_LIBRARY}") set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${CGAL_LIBRARIES_DIR}', ") # If CGAL is not header only, CGAL library may link with boost system, - add_gudhi_cython_lib(${Boost_SYSTEM_LIBRARY}) + if(CMAKE_BUILD_TYPE MATCHES Debug) + add_gudhi_cython_lib("${Boost_SYSTEM_LIBRARY_DEBUG}") + else() + add_gudhi_cython_lib("${Boost_SYSTEM_LIBRARY_RELEASE}") + endif() set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${Boost_LIBRARY_DIRS}', ") endif(CGAL_HEADER_ONLY) # GMP and GMPXX are not required, but if present, CGAL will link with them. if(GMP_FOUND) add_gudhi_debug_info("GMP_LIBRARIES = ${GMP_LIBRARIES}") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMP', ") - add_gudhi_cython_lib(${GMP_LIBRARIES}) + add_gudhi_cython_lib("${GMP_LIBRARIES}") set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMP_LIBRARIES_DIR}', ") if(GMPXX_FOUND) add_gudhi_debug_info("GMPXX_LIBRARIES = ${GMPXX_LIBRARIES}") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DCGAL_USE_GMPXX', ") - add_gudhi_cython_lib(${GMPXX_LIBRARIES}) + add_gudhi_cython_lib("${GMPXX_LIBRARIES}") set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${GMPXX_LIBRARIES_DIR}', ") endif(GMPXX_FOUND) endif(GMP_FOUND) @@ -176,8 +184,13 @@ if(CYTHON_FOUND) if (TBB_FOUND AND WITH_GUDHI_USE_TBB) add_gudhi_debug_info("TBB version ${TBB_INTERFACE_VERSION} found and used") set(GUDHI_CYTHON_EXTRA_COMPILE_ARGS "${GUDHI_CYTHON_EXTRA_COMPILE_ARGS}'-DGUDHI_USE_TBB', ") - add_gudhi_cython_lib(${TBB_RELEASE_LIBRARY}) - add_gudhi_cython_lib(${TBB_MALLOC_RELEASE_LIBRARY}) + if(CMAKE_BUILD_TYPE MATCHES Debug) + add_gudhi_cython_lib("${TBB_DEBUG_LIBRARY}") + add_gudhi_cython_lib("${TBB_MALLOC_DEBUG_LIBRARY}") + else() + add_gudhi_cython_lib("${TBB_RELEASE_LIBRARY}") + add_gudhi_cython_lib("${TBB_MALLOC_RELEASE_LIBRARY}") + endif() set(GUDHI_CYTHON_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}'${TBB_LIBRARY_DIRS}', ") set(GUDHI_CYTHON_INCLUDE_DIRS "${GUDHI_CYTHON_INCLUDE_DIRS}'${TBB_INCLUDE_DIRS}', ") endif() |