40 for (
int iDim=0; iDim<dim; iDim++) {
41 euklid += x[iDim]*x[iDim];
51 for (
int iDim=0; iDim<dim; iDim++) {
52 euklid += (x[iDim]-y[iDim])*(x[iDim]-y[iDim]);
84 OLB_ASSERT((x.size() == y.size()),
"Arrays must have same dimension");
92 return euklidN(x.data(), x.size());
99 OLB_ASSERT((x.size() == y.size()),
"Arrays must have same dimension");
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
T euklidN(const T x[], int dim)
Euclidean norm of an array.
T euklidDistance(const T x[], const T y[], int dim)
Euclidean distance between two arrays.
T euklidN2(const T x[], int dim)
Squared Euclidean norm of an array.
T euklidDistance2(const T x[], const T y[], int dim)
Squared Euclidean distance between two arrays.
Top level namespace for all of OpenLB.
#define OLB_ASSERT(COND, MESSAGE)