3
0
mirror of https://github.com/triqs/dft_tools synced 2025-04-16 13:39:25 +02:00
Olivier Parcollet 5128126055 arrays: change operator() && for const_view
Changed operator()(int, int...) && for array, and views.

- For const_view and regular type, returns value_type (i.e. a copy).
  NB : does make a copy, not a move. Ok for scalar type. TODO: think for complicated types.
  This allows codes like :
  f(x)(0,0) where f : x-> matrix or const_view
  to be correct in clef expression evaluation.

- For _view : return a value_type &, as before to allow :
    A(....)(0,0) = rhs;
  It is not possible to detect dangling refs in that case at compile time.
  Added a security in TRIQS_ARRAYS_DEBUG mode to detect a dangling ref at run time,
  i.e. the case where the view is "unique" (ref count ==1).
  This would be a quite bad design anyway ...

- also :

 - clean operator[] for vector (old workaround for old gcc...)
 - add IsView flag in ISP impl class, for the impl. of operator() &&
2014-03-02 17:11:48 +01:00
2014-02-19 11:59:47 +00:00
2013-12-21 13:25:37 +01:00
2014-02-26 16:24:51 +01:00
2014-01-30 20:28:30 +01:00
2013-12-17 21:38:11 +01:00

 
The TRIQS website is under http://ipht.cea.fr/triqs. Start there
to learn about TRIQS.

To install TRIQS, follow the installation steps given under
http://ipht.cea.fr/triqs/doc/user_manual/install/install.html

Before you proceed, make sure you have read the LICENSE.txt file.

Enjoy!

The TRIQS team

Description
No description provided
Readme 87 MiB
Languages
Python 54.8%
Fortran 37.4%
Shell 5.7%
C++ 2.1%