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

Detailed Description

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

Definition at line 972 of file TensorOps.h.

Member Typedef Documentation

◆ Type_t

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

Definition at line 974 of file TensorOps.h.

Member Function Documentation

◆ apply()

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

Definition at line 975 of file TensorOps.h.

976  {
977  Tensor<Type_t, D> res = Tensor<Type_t, D>::DontInitialize();
978  for (unsigned int i = 0; i < D; ++i)
979  for (unsigned int j = 0; j < D; ++j)
980  {
981  Type_t sum = lhs(i, 0) * rhs(0, j);
982  for (unsigned int k = 1; k < D; ++k)
983  sum += lhs(i, k) * rhs(k, j);
984  res(i, j) = sum;
985  }
986  return res;
987  }
typename BinaryReturn< T1, T2, OpMultiply >::Type_t Type_t
Definition: TensorOps.h:974

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