23 #ifndef QMCPLUSPLUS_INNER_PRODUCT_HPP 24 #define QMCPLUSPLUS_INNER_PRODUCT_HPP 40 template<
typename T,
typename TRES = T>
41 inline T
dot(
const T* restrict a,
const T* restrict b,
int n, TRES res = TRES())
43 for (
int i = 0; i <
n; i++)
54 template<
class T,
unsigned D,
class TRES = T>
57 for (
int i = 0; i <
n; i++)
69 template<
class T,
unsigned D,
class TRES = T>
72 for (
int i = 0; i <
n; i++)
86 inline T
dot(
int n,
const T* restrict x,
int incx,
const T* restrict y,
int incy)
88 const int xmax = incx *
n;
90 for (
int ic = 0, jc = 0; ic < xmax; ic += incx, jc += incy)
helper functions for EinsplineSetBuilder
T dot(const T *restrict a, const T *restrict b, int n, TRES res=TRES())
dot product
Tensor<T,D> class for D by D tensor.