template<class ArrayT>
Definition at line 30 of file Sum.h. References AddAssign(), Impala::Core::Vector::VectorSet< ArrayT >::GetVector(), Impala::Core::Vector::VectorSet< ArrayT >::GetVectorLength(), and Impala::Core::Vector::VectorSet< ArrayT >::HasConstVectorSize(). 00032 { 00033 typedef typename VectorSet<ArrayT>::VectorT VectorT; 00034 00035 if (!src->HasConstVectorSize()) 00036 { 00037 std::cout << "Vector::Sum: works for constant vector size only" << std::endl; 00038 return; 00039 } 00040 VectorT res(src->GetVectorLength(0)); 00041 res = 0; 00042 int endIdx = startIdx + nrSteps * stepSize; 00043 for (int i=startIdx ; i<endIdx ; i+=stepSize) 00044 AddAssign(res, src->GetVector(i, true)); 00045 if (!dst) 00046 dst = new VectorT(res); 00047 else 00048 *dst = res; 00049 }
Here is the call graph for this function:
|