mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
IfPoo to utils, mpi-type commit replacement
This commit is contained in:
parent
0ad5973101
commit
2121ec33f7
@ -466,6 +466,9 @@ namespace ngcore
|
|||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user