QMCPACK
OTDot< Tensor< T1, D >, SymTensor< T2, D > > Struct Template Reference
+ Collaboration diagram for OTDot< Tensor< T1, D >, SymTensor< 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 Tensor< T1, D > &lhs, const SymTensor< T2, D > &rhs)
 

Detailed Description

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

Definition at line 359 of file TinyVectorTensorOps.h.

Member Typedef Documentation

◆ Type_t

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

Definition at line 361 of file TinyVectorTensorOps.h.

Member Function Documentation

◆ apply()

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

Definition at line 362 of file TinyVectorTensorOps.h.

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

363  {
364  Tensor<Type_t, D> res = Tensor<Type_t, D>::DontInitialize();
365  for (unsigned int i = 0; i < D; ++i)
366  for (unsigned int j = 0; j < D; ++j)
367  {
368  Type_t sum = lhs(i, 0) * rhs.HL(j, 0);
369  unsigned int k = 1;
370  for (; k < j; ++k)
371  sum += lhs(i, k) * rhs.HL(j, k);
372  for (; k < D; ++k)
373  sum += lhs(i, k) * rhs.HL(k, j);
374  res[i * D + j] = sum;
375  }
376  return res;
377  }
typename BinaryReturn< T1, T2, OpMultiply >::Type_t Type_t

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