math/geogram: Unbreak on 15

PR:		286244
This commit is contained in:
Thierry Thomas 2025-04-20 13:16:21 -07:00 committed by Yuri Victorovich
parent 01460e3439
commit 55eef97830
11 changed files with 103 additions and 13 deletions

View file

@ -10,7 +10,6 @@ WWW= https://github.com/BrunoLevy/geogram # was: https://github.com/alicevision
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/doc/devkit/license.dox
BROKEN_FreeBSD_15= compilation is broken with clang-19, see https://github.com/BrunoLevy/geogram/issues/188
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= use of inline assembly for these architectures only, at least in src/lib/geogram/basic/atomics.h

View file

@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2018-12-09 18:48:27 UTC
--- CMakeLists.txt.orig 2024-06-14 05:04:18 UTC
+++ CMakeLists.txt
@@ -132,7 +132,7 @@ if(NOT GEOGRAM_LIB_ONLY)
@@ -141,7 +141,7 @@ endif()
add_subdirectory(tests)
endif()

View file

@ -0,0 +1,25 @@
--- src/lib/geogram/NL/nl_amgcl.cpp.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/NL/nl_amgcl.cpp
@@ -183,7 +183,7 @@ NLboolean nlSolveAMGCL() {
// There can be several linear systems to solve in OpenNL
for(int k=0; k<ctxt->nb_systems; ++k) {
-
+
if(ctxt->no_variables_indirection) {
x = (double*)ctxt->variable_buffer[k].base_address;
geo_assert(
@@ -192,9 +192,11 @@ NLboolean nlSolveAMGCL() {
}
if(ctxt->verbose) {
- GEO::Logger::out("AMGCL") << "Calling solver" << std::endl;
+ GEO::Logger::out("AMGCL") << "calling AMGCL solver (built in geogram) "
+ << "(" << Backend::name() << ")"
+ << std::endl;
}
-
+
// Call the solver and copy used iterations and last
// relative residual to OpenNL context.
std::tie(ctxt->used_iterations, ctxt->error) = solver(

View file

@ -1,6 +1,6 @@
--- src/lib/geogram/NL/nl_private.h.orig 2018-12-09 21:38:58 UTC
--- src/lib/geogram/NL/nl_private.h.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/NL/nl_private.h
@@ -67,7 +67,7 @@
@@ -62,7 +62,7 @@
#define NL_OS_APPLE
#endif

View file

@ -1,6 +1,6 @@
--- src/lib/geogram/basic/algorithm.h.orig 2018-12-09 17:43:13 UTC
--- src/lib/geogram/basic/algorithm.h.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/basic/algorithm.h
@@ -48,7 +48,7 @@
@@ -42,7 +42,7 @@
#include <geogram/basic/common.h>

View file

@ -1,6 +1,6 @@
--- src/lib/geogram/basic/command_line.cpp.orig 2018-12-09 17:46:56 UTC
--- src/lib/geogram/basic/command_line.cpp.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/basic/command_line.cpp
@@ -54,7 +54,7 @@
@@ -49,7 +49,7 @@
#include <iostream>
#include <iomanip>

View file

@ -1,6 +1,6 @@
--- src/lib/geogram/basic/common.h.orig 2018-12-09 17:36:40 UTC
--- src/lib/geogram/basic/common.h.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/basic/common.h
@@ -221,6 +221,35 @@ namespace GEO {
@@ -216,6 +216,35 @@ namespace GEO {
# define GEO_ARCH_32
#endif

View file

@ -1,6 +1,6 @@
--- src/lib/geogram/lua/lua_io.cpp.orig 2018-12-09 17:40:56 UTC
--- src/lib/geogram/lua/lua_io.cpp.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/lua/lua_io.cpp
@@ -243,6 +243,8 @@ namespace {
@@ -237,6 +237,8 @@ namespace {
const char* result = "unknown";
#if defined(GEO_OS_LINUX)
result = "Linux";

View file

@ -0,0 +1,38 @@
--- src/lib/geogram/third_party/PoissonRecon/PlyVertexMini.h.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/third_party/PoissonRecon/PlyVertexMini.h
@@ -44,7 +44,7 @@ class PlyValueVertex (public)
PlyValueVertex( void ) : value( Real(0) ) { ; }
PlyValueVertex( Point3D< Real > p , Real v ) : point(p) , value(v) { ; }
PlyValueVertex operator + ( PlyValueVertex p ) const { return PlyValueVertex( point+p.point , value+p.value ); }
- PlyValueVertex operator - ( PlyValueVertex p ) const { return PlyValueVertex( point-p.value , value-p.value ); }
+ PlyValueVertex operator - ( PlyValueVertex p ) const { return PlyValueVertex( point-p.point , value-p.value ); }
template< class _Real > PlyValueVertex operator * ( _Real s ) const { return PlyValueVertex( point*s , Real(value*s) ); }
template< class _Real > PlyValueVertex operator / ( _Real s ) const { return PlyValueVertex( point/s , Real(value/s) ); }
PlyValueVertex& operator += ( PlyValueVertex p ) { point += p.point , value += p.value ; return *this; }
@@ -68,7 +68,7 @@ class PlyOrientedVertex (public)
PlyOrientedVertex( void ) { ; }
PlyOrientedVertex( Point3D< Real > p , Point3D< Real > n ) : point(p) , normal(n) { ; }
PlyOrientedVertex operator + ( PlyOrientedVertex p ) const { return PlyOrientedVertex( point+p.point , normal+p.normal ); }
- PlyOrientedVertex operator - ( PlyOrientedVertex p ) const { return PlyOrientedVertex( point-p.value , normal-p.normal ); }
+ PlyOrientedVertex operator - ( PlyOrientedVertex p ) const { return PlyOrientedVertex( point-p.point , normal-p.normal ); }
template< class _Real > PlyOrientedVertex operator * ( _Real s ) const { return PlyOrientedVertex( point*s , normal*s ); }
template< class _Real > PlyOrientedVertex operator / ( _Real s ) const { return PlyOrientedVertex( point/s , normal/s ); }
PlyOrientedVertex& operator += ( PlyOrientedVertex p ) { point += p.point , normal += p.normal ; return *this; }
@@ -97,7 +97,7 @@ class PlyColorVertex (public)
}
_PlyColorVertex operator + ( _PlyColorVertex p ) const { return _PlyColorVertex( point+p.point , color+p.color ); }
- _PlyColorVertex operator - ( _PlyColorVertex p ) const { return _PlyColorVertex( point-p.value , color-p.color ); }
+ _PlyColorVertex operator - ( _PlyColorVertex p ) const { return _PlyColorVertex( point-p.point , color-p.color ); }
template< class _Real > _PlyColorVertex operator * ( _Real s ) const { return _PlyColorVertex( point*s , color*s ); }
template< class _Real > _PlyColorVertex operator / ( _Real s ) const { return _PlyColorVertex( point/s , color/s ); }
_PlyColorVertex& operator += ( _PlyColorVertex p ) { point += p.point , color += p.color ; return *this; }
@@ -143,7 +143,7 @@ class PlyColorAndValueVertex (public)
}
_PlyColorAndValueVertex operator + ( _PlyColorAndValueVertex p ) const { return _PlyColorAndValueVertex( point+p.point , color+p.color , value+p.value ); }
- _PlyColorAndValueVertex operator - ( _PlyColorAndValueVertex p ) const { return _PlyColorAndValueVertex( point-p.value , color-p.color , value+p.value ); }
+ _PlyColorAndValueVertex operator - ( _PlyColorAndValueVertex p ) const { return _PlyColorAndValueVertex( point-p.point , color-p.color , value+p.value ); }
template< class _Real > _PlyColorAndValueVertex operator * ( _Real s ) const { return _PlyColorAndValueVertex( point*s , color*s , value*s ); }
template< class _Real > _PlyColorAndValueVertex operator / ( _Real s ) const { return _PlyColorAndValueVertex( point/s , color/s , value/s ); }
_PlyColorAndValueVertex& operator += ( _PlyColorAndValueVertex p ) { point += p.point , color += p.color , value += p.value ; return *this; }

View file

@ -0,0 +1,18 @@
--- src/lib/geogram/third_party/PoissonRecon/SparseMatrix.inl.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/third_party/PoissonRecon/SparseMatrix.inl
@@ -191,11 +191,15 @@ void SparseMatrix< T >::SetRowSize( int row , int coun
}
+/*
+//[Bruno] 11/09/2024 commented-out (m_M, m_N do not exist, breaks
+// clang-19 compile
template<class T>
void SparseMatrix<T>::SetZero()
{
Resize(this->m_N, this->m_M);
}
+*/
template<class T>
SparseMatrix<T> SparseMatrix<T>::operator * (const T& V) const

View file

@ -0,0 +1,10 @@
--- src/lib/geogram/voronoi/convex_cell.cpp.orig 2024-06-14 05:04:18 UTC
+++ src/lib/geogram/voronoi/convex_cell.cpp
@@ -274,7 +274,6 @@ namespace VBW {
/***********************************************************************/
void ConvexCell::save(const std::string& filename, double shrink) const {
- std::cerr << "====> Saving " << filename << std::endl;
std::ofstream out(filename.c_str());
save(out, 1, shrink);
}