IfPoo to utils, mpi-type commit replacement

This commit is contained in:
Joachim Schoeberl 2023-03-05 17:16:35 +01:00
parent 0ad5973101
commit 2121ec33f7
3 changed files with 6 additions and 2 deletions

View File

@ -465,6 +465,9 @@ namespace ngcore
typedef int MPI_Request; typedef int MPI_Request;
enum { MPI_SUM = 0, MPI_MIN = 1, MPI_MAX = 2, MPI_LOR = 4711 }; 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 class NgMPI_Comm
{ {

View File

@ -514,8 +514,6 @@ namespace ngcore
return HSum(a.Lo()) + HSum(a.Hi()); 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<typename T, int N> template<typename T, int N>
NETGEN_INLINE SIMD<T,N> IfPos (SIMD<T,N> a, SIMD<T,N> b, SIMD<T,N> c) NETGEN_INLINE SIMD<T,N> IfPos (SIMD<T,N> a, SIMD<T,N> b, SIMD<T,N> c)

View File

@ -117,6 +117,9 @@ namespace ngcore
b = std::move(temp); 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 // checks if string starts with sequence
inline bool StartsWith(const std::string& str, const std::string& start) inline bool StartsWith(const std::string& str, const std::string& start)
{ {