QMCPACK
OTCDot_CC< T1, T2, D > Struct Template Reference
+ Collaboration diagram for OTCDot_CC< T1, T2, D >:

Public Types

using Type_t = typename BinaryReturn< T1, T2, OpMultiply >::Type_t
 

Static Public Member Functions

static Type_t apply (const TinyVector< std::complex< T1 >, D > &lhs, const TinyVector< std::complex< T2 >, D > &rhs)
 

Detailed Description

template<class T1, class T2, unsigned D>
struct qmcplusplus::OTCDot_CC< T1, T2, D >

Definition at line 65 of file ParticleAttribOps.h.

Member Typedef Documentation

◆ Type_t

using Type_t = typename BinaryReturn<T1, T2, OpMultiply>::Type_t

Definition at line 67 of file ParticleAttribOps.h.

Member Function Documentation

◆ apply()

static Type_t apply ( const TinyVector< std::complex< T1 >, D > &  lhs,
const TinyVector< std::complex< T2 >, D > &  rhs 
)
inlinestatic

Definition at line 68 of file ParticleAttribOps.h.

References qmcplusplus::real().

Referenced by qmcplusplus::complex_test_case(), and qmcplusplus::Dot_CC().

69  {
70  Type_t res = lhs[0].real() * rhs[0].real() + lhs[0].imag() * rhs[0].imag();
71  for (unsigned d = 1; d < D; ++d)
72  res += lhs[d].real() * rhs[d].real() + lhs[d].imag() * rhs[d].imag();
73  return res;
74  }
float real(const float &c)
real part of a scalar. Cannot be replaced by std::real due to AFQMC specific needs.
typename BinaryReturn< T1, T2, OpMultiply >::Type_t Type_t

The documentation for this struct was generated from the following file: