From 2121ec33f7a4590f0a6bcebf0e38d1808c660b49 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sun, 5 Mar 2023 17:16:35 +0100 Subject: [PATCH] IfPoo to utils, mpi-type commit replacement --- libsrc/core/mpi_wrapper.hpp | 3 +++ libsrc/core/simd_generic.hpp | 2 -- libsrc/core/utils.hpp | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libsrc/core/mpi_wrapper.hpp b/libsrc/core/mpi_wrapper.hpp index 42b42831..bf36394f 100644 --- a/libsrc/core/mpi_wrapper.hpp +++ b/libsrc/core/mpi_wrapper.hpp @@ -465,6 +465,9 @@ namespace ngcore typedef int MPI_Request; enum { MPI_SUM = 0, MPI_MIN = 1, MPI_MAX = 2, MPI_LOR = 4711 }; + + inline void MPI_Type_contiguous ( int, MPI_Datatype, MPI_Dataype*) { ; } + inline void MPI_Type_commit ( MPI_Dataype * ) { ; } class NgMPI_Comm { diff --git a/libsrc/core/simd_generic.hpp b/libsrc/core/simd_generic.hpp index 426070d9..a54aa4e9 100644 --- a/libsrc/core/simd_generic.hpp +++ b/libsrc/core/simd_generic.hpp @@ -514,8 +514,6 @@ namespace ngcore return HSum(a.Lo()) + HSum(a.Hi()); } - NETGEN_INLINE double IfPos (double a, double b, double c) { return a>0 ? b : c; } - NETGEN_INLINE double IfZero (double a, double b, double c) { return a==0. ? b : c; } template NETGEN_INLINE SIMD IfPos (SIMD a, SIMD b, SIMD c) diff --git a/libsrc/core/utils.hpp b/libsrc/core/utils.hpp index ac14f883..340d435c 100644 --- a/libsrc/core/utils.hpp +++ b/libsrc/core/utils.hpp @@ -117,6 +117,9 @@ namespace ngcore b = std::move(temp); } + NETGEN_INLINE double IfPos (double a, double b, double c) { return a>0 ? b : c; } + NETGEN_INLINE double IfZero (double a, double b, double c) { return a==0. ? b : c; } + // checks if string starts with sequence inline bool StartsWith(const std::string& str, const std::string& start) {