Lib/Kernels/DotVector.cpp
/**
 * Calculate the dot product of current instance and `rhs`.
 *
 * All vector elements of the result will contain the same value.
 */
Calculate the dot product of current instance and `rhs`.
All vector elements of the result will contain the same value.
Calculate the dot product of current instance and ` rhs ` . All vector elements of the result will contain the same value .
void DotVector::dot_product(Float::Ptr rhs, Float &result) {
  int label = prefetch_label();
  Float tmp = 0;  comment("DotVector::dot_product()");
  for (int i = 0; i < (int) elements.size(); ++i) {
    Float tmp2;
    prefetch(tmp2, rhs, label);  
    tmp += elements[i]*tmp2;
  }
  rotate_sum(tmp, result);
}
void DotVector :: dot_product ( Float :: Ptr rhs , Float & result ) { int label = prefetch_label ( ) ; Float tmp = 0 ; comment ( " " ) ; for ( int i = 0 ; i < ( int ) elements . size ( ) ; ++ i ) { Float tmp2 ; prefetch ( tmp2 , rhs , label ) ; tmp += elements [ i ] * tmp2 ; } rotate_sum ( tmp , result ) ; }
Calculate the dot product of current instance and `rhs`.
Calculate the dot product of current instance and ` rhs ` .
// on v3d, TMU is used always