QMCPACK
OTDot< SymTensor< T1, D >, Tensor< T2, D > > Struct Template Reference
+ Collaboration diagram for OTDot< SymTensor< T1, D >, Tensor< T2, D > >:

Public Types

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

Static Public Member Functions

static Tensor< Type_t, D > apply (const SymTensor< T1, D > &lhs, const Tensor< T2, D > &rhs)
 

Detailed Description

template<class T1, class T2, unsigned D>
struct qmcplusplus::OTDot< SymTensor< T1, D >, Tensor< T2, D > >

Definition at line 290 of file TinyVectorTensorOps.h.

Member Typedef Documentation

◆ Type_t

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

Definition at line 292 of file TinyVectorTensorOps.h.

Member Function Documentation

◆ apply()

static Tensor<Type_t, D> apply ( const SymTensor< T1, D > &  lhs,
const Tensor< T2, D > &  rhs 
)
inlinestatic

Definition at line 293 of file TinyVectorTensorOps.h.

References SymTensor< T, D >::HL().

294  {
295  Tensor<Type_t, D> res = Tensor<Type_t, D>::DontInitialize();
296  for (unsigned int i = 0; i < D; ++i)
297  for (unsigned int j = 0; j < D; ++j)
298  {
299  Type_t sum = lhs.HL(i, 0) * rhs(0, j);
300  unsigned int k = 1;
301  for (; k < i; ++k)
302  sum += lhs.HL(i, k) * rhs(k, j);
303  for (; k < D; ++k)
304  sum += lhs.HL(k, i) * rhs(k, j);
305  res(i, j) = sum;
306  }
307  return res;
308  }
typename BinaryReturn< T1, T2, OpMultiply >::Type_t Type_t

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