Skip to content

Commit

Permalink
Merge branch 'GUDHI:master' into persistence_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
hschreiber authored Nov 8, 2023
2 parents 03c8c7a + e49ca57 commit 16d271e
Show file tree
Hide file tree
Showing 9 changed files with 850 additions and 87 deletions.
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ jobs:
make all
ctest --output-on-failure
debug_tests:
docker:
- image: gudhi/ci_for_gudhi:latest
steps:
- checkout
- run:
name: Checkout submodules
command: |
git submodule sync
git submodule update --init
- run:
name: Build and test unitary tests
command: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-fsanitize=address -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF ..
make all
ctest --output-on-failure
utils:
docker:
- image: gudhi/ci_for_gudhi:latest
Expand Down Expand Up @@ -322,6 +341,7 @@ workflows:
- python_without_cgal
- examples
- tests
- debug_tests
- utils
- python
- doxygen
Expand Down
14 changes: 8 additions & 6 deletions scripts/build_osx_universal_gmpfr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ set -e
# Assumes that the user has enough rights to run brew fetch

# Downloading
SED_PGM='s/^Downloaded to: |^Already downloaded: //p'
mkdir deps-amd64
cd deps-amd64
tar xf "`brew fetch --bottle-tag=big_sur gmp | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=big_sur mpfr | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=x86_64_monterey gmp | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
tar xf "`brew fetch --bottle-tag=x86_64_monterey mpfr | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
cd ..
mkdir deps-arm64
cd deps-arm64
tar xf "`brew fetch --bottle-tag=arm64_big_sur gmp | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=arm64_big_sur mpfr | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=arm64_monterey gmp | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
tar xf "`brew fetch --bottle-tag=arm64_monterey mpfr | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
cd ..

# Merging
Expand All @@ -33,9 +34,10 @@ install_name_tool -id $PWD/deps-uni/lib/$GMP deps-uni/lib/$GMP
install_name_tool -id $PWD/deps-uni/lib/$GMPXX deps-uni/lib/$GMPXX
install_name_tool -id $PWD/deps-uni/lib/$MPFR deps-uni/lib/$MPFR
# Also fix dependencies
BADGMP=`otool -L deps-uni/lib/$MPFR|sed -ne 's/[[:space:]]*\(.*libgmp\..*dylib\).*/\1/p'`
# otool gives twice the same dependency, keep only one (a loop would be safer...)
BADGMP=`otool -L deps-uni/lib/$MPFR|sed -ne 's/[[:space:]]*\(.*libgmp\..*dylib\).*/\1/p'|uniq`
install_name_tool -change $BADGMP $PWD/deps-uni/lib/$GMP deps-uni/lib/$MPFR
BADGMP=`otool -L deps-uni/lib/$GMPXX|sed -ne 's/[[:space:]]*\(.*libgmp\..*dylib\).*/\1/p'`
BADGMP=`otool -L deps-uni/lib/$GMPXX|sed -ne 's/[[:space:]]*\(.*libgmp\..*dylib\).*/\1/p'|uniq`
install_name_tool -change $BADGMP $PWD/deps-uni/lib/$GMP deps-uni/lib/$GMPXX

ln -s $GMP deps-uni/lib/libgmp.dylib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ class Persistence_landscape {
nextLevelMerge.swap(nextNextLevelMerge);
}
(*this) = (*nextLevelMerge[0]);
if (!is_this_first_level) delete nextLevelMerge[0];
(*this) *= 1 / static_cast<double>(to_average.size());
}

Expand Down
Loading

0 comments on commit 16d271e

Please sign in to comment.