Exemplo n.º 1
0
 BOOST_UBLAS_INLINE
 typename V::value_type* vector_storage (ublas::vector_slice<V> &v) {
   typename V::value_type* ptr = vector_storage (v.data());
   ptr += v.start() * vector_stride (v.data());
   return ptr;
 }
Exemplo n.º 2
0
 BOOST_UBLAS_INLINE
 typename V::value_type* vector_storage (ublas::vector_reference<V> &v) {
   return vector_storage (v.expression());
 }
Exemplo n.º 3
0
 BOOST_UBLAS_INLINE
 typename V::value_type const* vector_storage (const ublas::vector_range<V> &v) {
   typename V::value_type const* ptr = vector_storage (v.data());
   ptr += v.start() * vector_stride (v.data());
   return ptr;
 }
Exemplo n.º 4
0
 friend vector_storage operator +(vector_storage const & A, vector_storage const & B) {
  if (A.size() != B.size()) TRIQS_RUNTIME_ERROR << " Trying to add 2 gf of different size";
  std::vector<T_non_view_t> r; r.reserve(A.size());
  for (size_t i=0; i<A.size(); ++i) r.push_back(A.data[i] + B.data[i]); 
  return vector_storage(r); 
 }