Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qcdloop for openSUSE:Factory checked in at 2025-05-05 22:26:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qcdloop (Old) and /work/SRC/openSUSE:Factory/.qcdloop.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qcdloop" Mon May 5 22:26:48 2025 rev:2 rq:1274246 version:2.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qcdloop/qcdloop.changes 2022-12-08 16:52:16.683818815 +0100 +++ /work/SRC/openSUSE:Factory/.qcdloop.new.30101/qcdloop.changes 2025-05-05 22:59:51.917221099 +0200 @@ -1,0 +2,23 @@ +Wed Apr 30 14:21:18 UTC 2025 - Atri Bhattacharya <badshah...@gmail.com> + +- Update to version 2.1.0: + * Add one more QUADMATH lookup path [gh#scarrazza/qcdloop#31]. + * Add support for aarch64 [gh#scarrazza/qcdloop#34]. +- Changes from version 2.0.11: + * fix: Allow for environment override of CMAKE_CXX_FLAGS + [gh#scarrazza/qcdloop#29]. +- Changes from version 2.0.10: + * Fix an off-by-one error in Tools::ddilog + [gh#scarrazza/qcdloop#24]. + * fix: Use 'grep -E' over 'egrep' [gh#scarrazza/qcdloop#25]. + * Small cmake updates [gh#scarrazza/qcdloop#23]. +- Drop patches incorporated upstream: + * qcdloop-quadmath-linking.patch + * qcdloop-remove-march-mtune-flags.patch +- Re-base qcdloop-soversion.patch for update. +- Allow building for aarch64 as this is now allowed by upstream + [gh#scarrazza/qcdloop#34]; still no support for ppc or power64, + so these remain excluded. +- Implement %check section to run tests (only for %ix86, x86_64). + +------------------------------------------------------------------- Old: ---- qcdloop-2.0.9.tar.gz qcdloop-quadmath-linking.patch qcdloop-remove-march-mtune-flags.patch New: ---- qcdloop-2.1.0.tar.gz BETA DEBUG BEGIN: Old:- Drop patches incorporated upstream: * qcdloop-quadmath-linking.patch * qcdloop-remove-march-mtune-flags.patch Old: * qcdloop-quadmath-linking.patch * qcdloop-remove-march-mtune-flags.patch - Re-base qcdloop-soversion.patch for update. BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qcdloop.spec ++++++ --- /var/tmp/diff_new_pack.9VqdrL/_old 2025-05-05 22:59:52.449243468 +0200 +++ /var/tmp/diff_new_pack.9VqdrL/_new 2025-05-05 22:59:52.449243468 +0200 @@ -1,7 +1,7 @@ # # spec file for package qcdloop # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,26 +18,21 @@ %global shlib libqcdloop2 Name: qcdloop -Version: 2.0.9 +Version: 2.1.0 Release: 0 Summary: An object-oriented one-loop scalar Feynman integrals framework License: GPL-3.0-only URL: https://qcdloop.web.cern.ch/qcdloop/ Source: https://github.com/scarrazza/qcdloop/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM qcdloop-math-linking.patch badshah...@gmail.com -- Explicitly link to math library to fix linking error when linking with --Wl,no-undefined -Patch0: qcdloop-quadmath-linking.patch # PATCH-FIX-UPSTREAM qcdloop-soversion.patch badshah...@gmail.com -- Implement so versioning Patch1: qcdloop-soversion.patch # PATCH-FIX-UPSTREAM qcdloop-fix-conflicting-types.patch badshah...@gmail.com -- Explicitly cast a variable type to ensure consistency across build archs; fixes build failures for i586 Patch2: qcdloop-fix-conflicting-types.patch -# PATCH-FEATURE-OPENSUSE qcdloop-remove-march-mtune-flags.patch badshah...@gmail.com -- Drop march and mtune flags being passed to the c++ compiler to enable building on multiple archs -Patch3: qcdloop-remove-march-mtune-flags.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gcc-fortran BuildRequires: pkgconfig -# Doesn't build on aarch64, ppc64* due to no quadmath -ExcludeArch: aarch64 %power64 +ExcludeArch: ppc %{power64} %description QCDLoop is a library of one-loop scalar Feynman integrals, evaluated close to @@ -67,16 +62,28 @@ %build %cmake \ +%ifarch %{ix86} x86_64 + -DQUADMATH_LIBRARY=quadmath \ -DENABLE_EXAMPLES:BOOL=ON \ - -DENABLE_FORTRAN_WRAPPER:BOOL=ON - +%endif + -DENABLE_FORTRAN_WRAPPER:BOOL=ON \ + %{nil} %cmake_build %install %cmake_install -%post -n %{shlib} -p /sbin/ldconfig -%postun -n %{shlib} -p /sbin/ldconfig +%ifarch %{ix86} x86_64 +%check +pushd %__builddir +for exe in ./cache_test ./cmass_test ./trigger_test; +do + exec ${exe} +done +popd +%endif + +%ldconfig_scriptlets -n %{shlib} %files -n %{shlib} %{_libdir}/libqcdloop.so.* ++++++ qcdloop-2.0.9.tar.gz -> qcdloop-2.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/.github/workflows/fedora35/Dockerfile new/qcdloop-2.1.0/.github/workflows/fedora35/Dockerfile --- old/qcdloop-2.0.9/.github/workflows/fedora35/Dockerfile 1970-01-01 01:00:00.000000000 +0100 +++ new/qcdloop-2.1.0/.github/workflows/fedora35/Dockerfile 2024-12-20 11:07:14.000000000 +0100 @@ -0,0 +1,3 @@ +FROM fedora:35 +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/.github/workflows/fedora35/action.yaml new/qcdloop-2.1.0/.github/workflows/fedora35/action.yaml --- old/qcdloop-2.0.9/.github/workflows/fedora35/action.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/qcdloop-2.1.0/.github/workflows/fedora35/action.yaml 2024-12-20 11:07:14.000000000 +0100 @@ -0,0 +1,15 @@ +name: 'Compile QCDLOOP' +description: 'QCDLOOP' +inputs: + who-to-greet: # id of input + description: 'Set something' + required: true + default: 'Hi !' +outputs: + time: # id of output + description: 'Some result' +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.who-to-greet }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/.github/workflows/fedora35/entrypoint.sh new/qcdloop-2.1.0/.github/workflows/fedora35/entrypoint.sh --- old/qcdloop-2.0.9/.github/workflows/fedora35/entrypoint.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/qcdloop-2.1.0/.github/workflows/fedora35/entrypoint.sh 2024-12-20 11:07:14.000000000 +0100 @@ -0,0 +1,12 @@ +#!/bin/sh -l +set -x +uname -a +cat /etc/issue +dnf -y install gcc gcc-c++ gcc-gfortran make which cmake cmake-data cmake-filesystem + +cmake -S . -B BUILD -DCMAKE_INSTALL_PREFIX=$(pwd)/INSTALL +cmake --build BUILD +cmake --install BUILD + +out=$? +echo ::set-output name=out::$out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/.github/workflows/main.yml new/qcdloop-2.1.0/.github/workflows/main.yml --- old/qcdloop-2.0.9/.github/workflows/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/qcdloop-2.1.0/.github/workflows/main.yml 2024-12-20 11:07:14.000000000 +0100 @@ -0,0 +1,52 @@ +name: build +on: + push: + pull_request: + schedule: +#Every 50 days at midnight + - cron: "0 0 1/600 * *" + +jobs: + + compilejobFedora35: + if: "!contains(github.event.head_commit.message, 'skip ci')" + runs-on: ubuntu-latest + name: CI_on_Fedora35 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Compile + id: compileindocker + uses: ./.github/workflows/fedora35 + - name: Get the output status + run: exit ${{ steps.compileindocker.outputs.out }} + + + compilejobRocky9_ARM: + if: "!contains(github.event.head_commit.message, 'skip ci')" + name: Rocky9aarch64_ARM + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: QEMU + run: | + set -x + sudo apt update + sudo apt install --yes binfmt-support qemu-user-static wget + - name: Compile_with_arm + continue-on-error: true + uses: addnab/docker-run-action@v3 + with: + image: arm64v8/rockylinux:9 + options: -v ${{ github.workspace }}:/work --platform=linux/arm64/v8 + run: | + set -e + set -x + dnf -y install gcc gcc-c++ gcc-gfortran make which cmake cmake-data cmake-filesystem + cd work + pwd + ls + cmake -S . -B BUILD -DCMAKE_INSTALL_PREFIX=$(pwd)/INSTALL + cmake --build BUILD + cmake --install BUILD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/.gitignore new/qcdloop-2.1.0/.gitignore --- old/qcdloop-2.0.9/.gitignore 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/.gitignore 2024-12-20 11:07:14.000000000 +0100 @@ -51,4 +51,7 @@ src/qcdloop/stamp-h1 examples/cache_test examples/cmass_test -examples/trigger_test \ No newline at end of file +examples/trigger_test +# pixi environments +.pixi +*.egg-info diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/CMakeLists.txt new/qcdloop-2.1.0/CMakeLists.txt --- old/qcdloop-2.0.9/CMakeLists.txt 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/CMakeLists.txt 2024-12-20 11:07:14.000000000 +0100 @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.0.2) +cmake_minimum_required(VERSION 3.12...3.31) # Disable the use of RPATHS - we probably are not # that interested in relocatable binaries and it @@ -15,18 +15,42 @@ endif() project(qcdloop) - +include(GNUInstallDirs) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(VERSION "\"2.0.9\"") -set(CMAKE_CXX_FLAGS "-Wall -Wextra -march=nocona -mtune=haswell -fvisibility-inlines-hidden -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -fext-numeric-literals") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fPIC ${CMAKE_CXX_FLAGS}" CACHE STRING "debug compile flags" FORCE) -set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fsanitize=address" CACHE STRING "debug linker flags" FORCE) +set(VERSION 2.1.0) + +# Set default CXXFLAGS but allow for environment override +# c.f. https://cmake.org/cmake/help/v3.31/envvar/CXXFLAGS.html +if (NOT CMAKE_CXX_FLAGS) + # c.f. https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html + if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + set(CMAKE_CXX_FLAGS "-Wall -Wextra -fvisibility-inlines-hidden -fmessage-length=0 -ftree-vectorize -fstack-protector-strong -O2 -pipe -fext-numeric-literals") + else() + set(CMAKE_CXX_FLAGS "-Wall -Wextra") + endif() +else() + if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + # Ensure -fext-numeric-literals is in CMAKE_CXX_FLAGS + string(FIND "${CMAKE_CXX_FLAGS}" "-fext-numeric-literals" _found_ext_numeric_literals) + if (_found_ext_numeric_literals EQUAL -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals" CACHE STRING "Update environment CXXFLAGS" FORCE) + endif() + endif() +endif() + +# TODO: QCDLoop is currently only well tested on GNU, so other compiler +# and linker defaults should be added as they become known +if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address ${CMAKE_CXX_FLAGS}" CACHE STRING "debug CXXFLAGS" FORCE) + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address" CACHE STRING "debug linker flags" FORCE) +endif() + set(prefix ${CMAKE_INSTALL_PREFIX}) -set(exec_prefix "${prefix}") -set(includedir "${prefix}/include") -set(libdir "${prefix}/lib") +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) +set(libdir ${CMAKE_INSTALL_LIBDIR}) configure_file( "${PROJECT_SOURCE_DIR}/src/qcdloop/config.h.in" @@ -42,7 +66,7 @@ "${PROJECT_SOURCE_DIR}/src/qcdloop.pc.in" "${PROJECT_SOURCE_DIR}/src/qcdloop.pc" ) - +IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64") set(QUADMATH_NAMES ${QUADMATH_NAMES} libquadmath.so quadmath) find_library(QUADMATH_LIBRARY NAMES ${QUADMATH_NAMES} @@ -51,6 +75,8 @@ /usr/local/lib /usr/x86_64-linux-gnu/* /usr/lib/gcc/x86_64-linux-gnu/* /usr/lib/gcc/x86_64-redhat-linux/* + /usr/lib/gcc/x86_64-pc-linux-gnu/* + "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" ) if(QUADMATH_LIBRARY) @@ -69,7 +95,7 @@ message(FATAL_ERROR "Could not find QuadMath") endif(QUADMATH_FIND_REQUIRED) endif(QUADMATH_FOUND) - +endif() # libqcdloop configuration include_directories(src/qcdloop src) FILE(GLOB_RECURSE Headers "src/qcdloop/*.h") @@ -86,13 +112,13 @@ ${Headers} ) -target_link_libraries(qcdloop) +target_link_libraries(qcdloop ${QUADMATH_LIBRARY}) install(FILES ${CMAKE_BINARY_DIR}/src/qcdloop-config DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(FILES ${PROJECT_SOURCE_DIR}/src/qcdloop.pc DESTINATION lib/pkgconfig) -install(DIRECTORY src/qcdloop DESTINATION include) -install(TARGETS qcdloop DESTINATION lib) +install(FILES ${PROJECT_SOURCE_DIR}/src/qcdloop.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +install(DIRECTORY src/qcdloop DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(TARGETS qcdloop DESTINATION ${CMAKE_INSTALL_LIBDIR}) # enable disable fortran/wrapper (to avoid name conflicts with ql1.x) option(ENABLE_FORTRAN_WRAPPER "Enable fortran wrapper" ON) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/README.md new/qcdloop-2.1.0/README.md --- old/qcdloop-2.0.9/README.md 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/README.md 2024-12-20 11:07:14.000000000 +0100 @@ -6,12 +6,12 @@ # General information -Homepage with library description: http://cern.ch/qcdloop +Homepage with library description: https://qcdloop.web.cern.ch If you use this code in your publication, please cite [arXiv:0712.1851](http://arxiv.org/abs/0712.1851) and [arXiv:1605.03181](http://arxiv.org/abs/1605.03181). - + ## Download You can obtain QCDLoop releases directly from the github repository: @@ -31,7 +31,9 @@ git checkout tags/tag_name ``` -## Installation +## Installation + +### From source Checkout the code and compile the code using the following procedure: @@ -44,15 +46,34 @@ ``` By the default, if prefix is not set the program is installed in -/usr/local. If you define a custom prefix, use the `-DCMAKE_INSTALL_PREFIX` option and -remember to export qcdloop/lib to the LD_LIBRARY_PATH. QCDLoop requires a compiler with -C++11 and quadmath features (e.g. gcc >= 5). +`/usr/local`. If you define a custom prefix, use the `-DCMAKE_INSTALL_PREFIX` option and +remember to export `qcdloop/lib` to the `LD_LIBRARY_PATH`. QCDLoop requires a compiler with +C++11 and `quadmath` features (e.g. `gcc >= 5`). Other qcdloop cmake options are: -- `ENABLE_EXAMPLES`, build examples in C++, default OFF. -- `ENABLE_FORTRAN_WRAPPER`, include fortran wrapper in the library, default ON. +- `ENABLE_EXAMPLES`, build examples in C++, default `OFF`. +- `ENABLE_FORTRAN_WRAPPER`, include fortran wrapper in the library, default `ON`. + +The fortran wrapper follows the previous syntax in `qcdloop`, see details in table 2 of https://arxiv.org/pdf/1605.03181.pdf. + +### From conda-forge + +QCDLoop is packaged and distributed on [conda-forge](https://github.com/conda-forge/qcdloop-feedstock/) for the following platforms: + +[](https://anaconda.org/conda-forge/qcdloop) +[](https://anaconda.org/conda-forge/qcdloop) + +To install and add QCDLoop to a project with [`pixi`](https://pixi.sh/), from the project directory run -The fortran wrapper follows the previous syntax in qcdloop, see details in table 2 of https://arxiv.org/pdf/1605.03181.pdf. +``` +pixi add qcdloop +``` + +and to install into a particular conda environment with [`conda`](https://docs.conda.io/projects/conda/), in the activated environment run + +``` +conda install --channel conda-forge qcdloop +``` ## Contact Information diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/cache.cc new/qcdloop-2.1.0/src/cache.cc --- old/qcdloop-2.0.9/src/cache.cc 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/cache.cc 2024-12-20 11:07:14.000000000 +0100 @@ -17,6 +17,7 @@ seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); } +#if defined(__x86_64__) || defined(__i386__) template <> struct hash<ql::qdouble> : public __hash_base<size_t, ql::qdouble> { @@ -25,6 +26,7 @@ return x != 0.0q ? std::_Hash_impl::hash(x) : 0; } }; +#endif template <> struct hash<ql::complex> : public __hash_base<size_t, ql::complex> { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/qcdloop/config.h.in new/qcdloop-2.1.0/src/qcdloop/config.h.in --- old/qcdloop-2.0.9/src/qcdloop/config.h.in 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/qcdloop/config.h.in 2024-12-20 11:07:14.000000000 +0100 @@ -1 +1 @@ -#define VERSION @VERSION@ +#define VERSION "@VERSION@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/qcdloop/maths.h new/qcdloop-2.1.0/src/qcdloop/maths.h --- old/qcdloop-2.0.9/src/qcdloop/maths.h 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/qcdloop/maths.h 2024-12-20 11:07:14.000000000 +0100 @@ -8,7 +8,11 @@ #pragma once #include "types.h" - +#include <stdlib.h> +#include <complex.h> +#include <tgmath.h> +#include <float.h> +#include <cmath> /*! * Some basic math functions with inline (performance) * for double and quadruple precision. @@ -17,41 +21,81 @@ { // Logarithms inline double Log(double const& x) { return std::log(x); } +#if defined(__x86_64__) || defined(__i386__) inline qdouble Log(qdouble const& x) { return logq(x); } - inline complex Log(complex const& x) { return std::log(x); } inline qcomplex Log(qcomplex const& x) { return clogq(x); } +#endif +#if defined(__aarch64__) + inline qdouble Log(qdouble const& x) { return std::log(x); } + inline qcomplex Log(qcomplex const& x) { return clogl(x); } +#endif + inline complex Log(complex const& x) { return std::log(x); } // Power inline double Pow(double const& x, int const& a) { return std::pow(x, a); } +#if defined(__x86_64__) || defined(__i386__) inline qdouble Pow(qdouble const& x, int const& a) { return powq(x,a); } - inline complex Pow(complex const& x, int const& a) { return std::pow(x,a); } inline qcomplex Pow(qcomplex const& x, int const& a){ return cpowq(x,a); } +#endif +#if defined(__aarch64__) + inline qdouble Pow(qdouble const& x, int const& a) { return std::pow(x,a); } + inline qcomplex Pow(qcomplex const& x, int const& a){ return cpowl(x,a); } +#endif + inline complex Pow(complex const& x, int const& a) { return std::pow(x,a); } // Root inline double Sqrt(double const& x) { return std::sqrt(x); } +#if defined(__x86_64__) || defined(__i386__) inline qdouble Sqrt(qdouble const& x) { return sqrtq(x); } - inline complex Sqrt(complex const& x) { return std::sqrt(x); } inline qcomplex Sqrt(qcomplex const& x){ return csqrtq(x); } +#endif +#if defined(__aarch64__) + inline qdouble Sqrt(qdouble const& x) { return std::sqrt(x); } + inline qcomplex Sqrt(qcomplex const& x){ return csqrtl(x); } +#endif + inline complex Sqrt(complex const& x) { return std::sqrt(x); } // Absolute value inline double Abs(double const& x) { return std::abs(x); } +#if defined(__x86_64__) || defined(__i386__) inline qdouble Abs(qdouble const& x) { return fabsq(x);} - inline double Abs(complex const& x) { return std::abs(x);} inline qdouble Abs(qcomplex const& x) { return cabsq(x); } +#endif +#if defined(__aarch64__) + inline qdouble Abs(qdouble const& x) { return std::abs(x);} + inline qdouble Abs(qcomplex const& x) { return cabsl(x); } +#endif + inline double Abs(complex const& x) { return std::abs(x);} // Complex tools, imag, real and conj. inline double Imag(double const& x) { UNUSED(x); return 0; } inline qdouble Imag(qdouble const& x) { UNUSED(x); return qdouble(0); } inline double Imag(complex const& x) { return x.imag(); } +#if defined(__x86_64__) || defined(__i386__) inline qdouble Imag(qcomplex const& x){ return cimagq(x);} +#endif +#if defined(__aarch64__) + inline qdouble Imag(qcomplex const& x){ return cimagl(x);} +#endif inline double Real(double const& x) { return x; } inline qdouble Real(qdouble const& x) { return x; } inline double Real(complex const& x) { return x.real(); } +#if defined(__x86_64__) || defined(__i386__) inline qdouble Real(qcomplex const& x) { return crealq(x); } +#endif +#if defined(__aarch64__) + inline qdouble Real(qcomplex const& x) { return creall(x); } +#endif inline complex Conjg(complex const& x) { return std::conj(x); } +#if defined(__x86_64__) || defined(__i386__) inline qcomplex Conjg(qcomplex const& x){ return conjq(x); } +#endif +#if defined(__aarch64__) + inline qcomplex Conjg(qcomplex const& x){ return conjl(x); } +#endif + // Comparison and sign operations inline int Sign(double const& x) { return (double(0) < x) - (x < double(0)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/qcdloop/types.h new/qcdloop-2.1.0/src/qcdloop/types.h --- old/qcdloop-2.0.9/src/qcdloop/types.h 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/qcdloop/types.h 2024-12-20 11:07:14.000000000 +0100 @@ -7,9 +7,28 @@ #pragma once +#if defined(__x86_64__) || defined(__i386__) extern "C" { // for gcc4.7 compatibility #include <quadmath.h> } +#endif +#if defined(__aarch64__) +#include <stdlib.h> +#include <complex.h> +#include <tgmath.h> +#include <float.h> +using __float128 = long double; +using __complex128 = long double _Complex; +extern "C" { +__complex128 conjl(__complex128); +__float128 cimagl(__complex128); +__float128 creall(__complex128); +__complex128 csqrtl(__complex128); +__complex128 clogl(__complex128); +__float128 cabsl(__complex128); +__complex128 cpowl(__complex128,__complex128); +} +#endif #include <complex> #define UNUSED(expr) (void)(expr) @@ -29,8 +48,11 @@ namespace std { + +#if defined(__x86_64__) || defined(__i386__) //! implementation of operator<< for qdouble ostream& operator<<(std::ostream& out, ql::qdouble f); +#endif //! implementation of operator<< for qcomplex ostream& operator<<(std::ostream& out, ql::qcomplex f); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/qcdloop-config.in new/qcdloop-2.1.0/src/qcdloop-config.in --- old/qcdloop-2.0.9/src/qcdloop-config.in 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/qcdloop-config.in 2024-12-20 11:07:14.000000000 +0100 @@ -4,7 +4,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -if [[ $# -eq 0 || -n $( echo $* | egrep -- "--help|-h" ) ]]; then +if [[ $# -eq 0 || -n $( echo $* | grep -E -- "--help|-h" ) ]]; then echo echo "qcdloop-config: configuration tool for qcdloop" echo @@ -21,23 +21,23 @@ OUT="" -tmp=$( echo "$*" | egrep -- '--\<prefix\>') +tmp=$( echo "$*" | grep -E -- '--\<prefix\>') test -n "$tmp" && OUT="$OUT @prefix@" -tmp=$( echo "$*" | egrep -- '--\<incdir\>') +tmp=$( echo "$*" | grep -E -- '--\<incdir\>') test -n "$tmp" && OUT="$OUT @includedir@" -tmp=$( echo "$*" | egrep -- '--\<cppflags\>') +tmp=$( echo "$*" | grep -E -- '--\<cppflags\>') test -n "$tmp" && OUT="$OUT -I@includedir@ -std=c++11" -tmp=$( echo "$*" | egrep -- '--\<libdir\>') +tmp=$( echo "$*" | grep -E -- '--\<libdir\>') test -n "$tmp" && OUT="$OUT @libdir@" -tmp=$( echo "$*" | egrep -- '--\<ldflags\>') +tmp=$( echo "$*" | grep -E -- '--\<ldflags\>') test -n "$tmp" && OUT="$OUT -L@libdir@ -lqcdloop -lquadmath" ## Version -tmp=$( echo "$*" | egrep -- '--\<version\>') +tmp=$( echo "$*" | grep -E -- '--\<version\>') test -n "$tmp" && OUT="$OUT @VERSION@" echo $OUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/tools.cc new/qcdloop-2.1.0/src/tools.cc --- old/qcdloop-2.0.9/src/tools.cc 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/tools.cc 2024-12-20 11:07:14.000000000 +0100 @@ -20,7 +20,12 @@ template<typename TOutput, typename TMass, typename TScale> Tools<TOutput,TMass,TScale>::Tools(): _qlonshellcutoff(is_same<TScale,double>::value ? 1e-10 : 1e-20q), +#if defined(__x86_64__) || defined(__i386__) _pi(is_same<TScale,double>::value ? M_PI : M_PIq), +#endif +#if defined(__aarch64__) + _pi(is_same<TScale,double>::value ? M_PI : M_PIl), +#endif _pi2 (_pi*_pi), _pio3 (_pi/TScale(3)), _pio6 (_pi/TScale(6)), @@ -368,7 +373,7 @@ const TMass H = Y+Y-_one; const TMass ALFA = H+H; TMass B1 = _zero, B2 = _zero, B0 = _zero; - for (int i = _C.size(); i >= 0; i--) + for (int i = _C.size() - 1; i >= 0; i--) { B0 = _C[i]+ALFA*B1-B2; B2 = B1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qcdloop-2.0.9/src/types.cc new/qcdloop-2.1.0/src/types.cc --- old/qcdloop-2.0.9/src/types.cc 2022-05-20 11:58:18.000000000 +0200 +++ new/qcdloop-2.1.0/src/types.cc 2024-12-20 11:07:14.000000000 +0100 @@ -9,6 +9,7 @@ namespace std { +#if defined(__x86_64__) || defined(__i386__) ostream& operator<<(std::ostream& out, ql::qdouble f) { char buf[200]; @@ -24,6 +25,14 @@ out << "(" << crealq(f) << "," << cimagq(f) << ")"; return out; } +#endif +#if defined(__aarch64__) + ostream& operator<<(std::ostream& out, ql::qcomplex f) + { + out << "(" << creall(f) << "," << cimagl(f) << ")"; + return out; + } +#endif ostream& operator<<(std::ostream& os, ql::Code code) { ++++++ qcdloop-fix-conflicting-types.patch ++++++ --- /var/tmp/diff_new_pack.9VqdrL/_old 2025-05-05 22:59:52.561248177 +0200 +++ /var/tmp/diff_new_pack.9VqdrL/_new 2025-05-05 22:59:52.565248345 +0200 @@ -1,8 +1,8 @@ -Index: qcdloop-2.0.5b1/src/types.cc +Index: qcdloop-2.1.0/src/types.cc =================================================================== ---- qcdloop-2.0.5b1.orig/src/types.cc -+++ qcdloop-2.0.5b1/src/types.cc -@@ -13,7 +13,7 @@ namespace std +--- qcdloop-2.1.0.orig/src/types.cc ++++ qcdloop-2.1.0/src/types.cc +@@ -14,7 +14,7 @@ namespace std { char buf[200]; std::ostringstream format; ++++++ qcdloop-soversion.patch ++++++ --- /var/tmp/diff_new_pack.9VqdrL/_old 2025-05-05 22:59:52.577248850 +0200 +++ /var/tmp/diff_new_pack.9VqdrL/_new 2025-05-05 22:59:52.581249018 +0200 @@ -1,54 +1,35 @@ -Index: qcdloop-2.0.9/CMakeLists.txt +Index: qcdloop-2.1.0/CMakeLists.txt =================================================================== ---- qcdloop-2.0.9.orig/CMakeLists.txt -+++ qcdloop-2.0.9/CMakeLists.txt -@@ -14,19 +14,22 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CO +--- qcdloop-2.1.0.orig/CMakeLists.txt ++++ qcdloop-2.1.0/CMakeLists.txt +@@ -14,12 +14,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CO "MinSizeRel" "RelWithDebInfo") endif() -project(qcdloop) -+project(qcdloop VERSION 2.0.9) - ++project(qcdloop VERSION 2.1.0) + include(GNUInstallDirs) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) --set(VERSION "\"2.0.9\"") -+set(VERSION "\"${PROJECT_VERSION}\"") - set(CMAKE_CXX_FLAGS "-Wall -Wextra -march=nocona -mtune=haswell -fvisibility-inlines-hidden -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -fext-numeric-literals") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fPIC ${CMAKE_CXX_FLAGS}" CACHE STRING "debug compile flags" FORCE) - set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fsanitize=address" CACHE STRING "debug linker flags" FORCE) -+ -+include(GNUInstallDirs) -+ - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix "${prefix}") - set(includedir "${prefix}/include") --set(libdir "${prefix}/lib") -+set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) +-set(VERSION 2.1.0) ++set(VERSION ${PROJECT_VERSION}) - configure_file( - "${PROJECT_SOURCE_DIR}/src/qcdloop/config.h.in" -@@ -87,12 +90,14 @@ add_library(qcdloop SHARED src/box.cc + # Set default CXXFLAGS but allow for environment override + # c.f. https://cmake.org/cmake/help/v3.31/envvar/CXXFLAGS.html +@@ -113,6 +113,8 @@ add_library(qcdloop SHARED src/box.cc ) - target_link_libraries(qcdloop quadmath) + target_link_libraries(qcdloop ${QUADMATH_LIBRARY}) +set_target_properties(qcdloop PROPERTIES VERSION ${PROJECT_VERSION}) +set_target_properties(qcdloop PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}) install(FILES ${CMAKE_BINARY_DIR}/src/qcdloop-config DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) --install(FILES ${PROJECT_SOURCE_DIR}/src/qcdloop.pc DESTINATION lib/pkgconfig) -+install(FILES ${PROJECT_SOURCE_DIR}/src/qcdloop.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - install(DIRECTORY src/qcdloop DESTINATION include) --install(TARGETS qcdloop DESTINATION lib) -+install(TARGETS qcdloop LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - # enable disable fortran/wrapper (to avoid name conflicts with ql1.x) - option(ENABLE_FORTRAN_WRAPPER "Enable fortran wrapper" ON) -Index: qcdloop-2.0.9/src/qcdloop.pc.in +Index: qcdloop-2.1.0/src/qcdloop.pc.in =================================================================== ---- qcdloop-2.0.9.orig/src/qcdloop.pc.in -+++ qcdloop-2.0.9/src/qcdloop.pc.in +--- qcdloop-2.1.0.orig/src/qcdloop.pc.in ++++ qcdloop-2.1.0/src/qcdloop.pc.in @@ -5,6 +5,6 @@ libdir=@libdir@ Name: nnpdf