From 85e61212ef42e649eaea444bd9cbcad4fc26d31a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 4 Jun 2023 11:06:19 +0800 Subject: Explicit when using function_ptr Phoenix binder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From the errors: base type ‘float (*)(float, float) noexcept’ fails to be a struct or class type struct functor_action : public FuncT { ^~~~~~~~~~~~~~ ‘float (*)(float, float) noexcept’ is not a class, struct, or union type struct result { typedef typename FuncT::result_type type; }; ^~~~ type ‘float (*)(float, float) noexcept’ is not a direct base of ‘phoenix::functor_action’ : FuncT(fptr_) {} ^ it seems that GCC, at least the ones on my system, failed to deduce that the binder meant to be used when trying to bind the C Std Math Library's powf and fmodf functions is of course the function pointer one (specifically the 2 args specialisation), and not the functor one. --- indra/llmath/llcalcparser.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index dff5bf3af3..e4656d2376 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -131,14 +131,14 @@ struct LLCalcParser : grammar power = unary_expr[power.value = arg1] >> - *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)])) + *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)])) ; term = power[term.value = arg1] >> *(('*' >> assert_syntax(power[term.value *= arg1])) | ('/' >> assert_syntax(power[term.value /= arg1])) | - ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)])) + ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)])) ) ; -- cgit v1.2.3 From 6e4f095baa8e33effe80b68ddf834a3b80f2bb67 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 20:58:27 +0800 Subject: Setting BUILD_SHARED_LIBS on is now possible by removing cyclic dependencies, and allowing shlib undefined on SLPlugin alone. --- indra/llmath/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index eb29df245a..955bade204 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -99,7 +99,8 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) -target_link_libraries(llmath llcommon llmeshoptimizer) +include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) +target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests -- cgit v1.2.3 From 665a55a1a232877ccb499dbfd17806f438385e82 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 29 Jul 2023 21:07:13 +0800 Subject: The Linden libraries can be installed now Useful when installed as shared libraries, so other viewer executables can share these libraries. --- indra/llmath/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 955bade204..fe13d17fce 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -59,6 +59,7 @@ set(llmath_HEADER_FILES llmath.h llmatrix3a.h llmatrix3a.inl + llmatrix4a.h llmodularmath.h lloctree.h llperlin.h @@ -103,6 +104,8 @@ include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibraryInstall) + # Add tests if (LL_TESTS) include(LLAddBuildTest) -- cgit v1.2.3 From 7aa0299d38dd8fdef9d7e722e94db84c7b2fb5f4 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 1 Aug 2023 09:30:00 +0800 Subject: Set so dangling pointer is no error when using GCC --- indra/llmath/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index fe13d17fce..de00843be3 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -104,6 +104,12 @@ include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +if (USESYSTEMLIBS) + AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_source_files_properties(llcalc.cpp PROPERTIES + COMPILE_FLAGS -Wno-dangling-pointer) +endif () + include(LibraryInstall) # Add tests -- cgit v1.2.3 From 02090f361e631a014a3e2d35cb25229ad0f0b843 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 1 Aug 2023 09:43:21 +0800 Subject: Fix commit 7aa029 --- indra/llmath/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index de00843be3..dfd7491790 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -104,8 +104,7 @@ include_directories(${CMAKE_SOURCE_DIR}/llmeshoptimizer) target_link_libraries(llmath llcommon) target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -if (USESYSTEMLIBS) - AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") +if (USESYSTEMLIBS AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") set_source_files_properties(llcalc.cpp PROPERTIES COMPILE_FLAGS -Wno-dangling-pointer) endif () -- cgit v1.2.3 From 84b72f12d42e08fe989752ce36e1972bb11c8d70 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 17 Aug 2023 21:01:51 +0800 Subject: Neon is used as an alternative to SSE2 on Arm systems. --- indra/llmath/llsimdmath.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index 54a275633f..a6f57d1853 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -31,7 +31,7 @@ #error "Please include llmath.h before this file." #endif -#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) ) +#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__ || __ARM_NEON) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && ADDRESS_SIZE == 32 ) ) #error SSE2 not enabled. LLVector4a and related class will not compile. #endif @@ -39,8 +39,12 @@ #include #endif +#if defined(__i386__) || defined(__x86_64__) #include #include +#else +#include +#endif #include "llmemory.h" #include "llsimdtypes.h" -- cgit v1.2.3