3
0
mirror of https://github.com/triqs/dft_tools synced 2024-10-31 19:23:45 +01:00
dft_tools/triqs/arrays
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
..
blas_lapack arrays: add gelss 2014-02-03 22:16:58 +01:00
expression_template arrays: correction of value_type of matrix_expr 2014-01-30 20:28:30 +01:00
functional arrays: clean cache, add traits ... 2013-11-18 23:41:32 +01:00
h5 arrays: h5 read/write for arrays of complex types 2014-02-13 21:46:23 +01:00
impl arrays: change operator() && for const_view 2014-03-02 17:11:48 +01:00
indexmaps port to clang 3.4 2013-11-18 23:41:32 +01:00
linalg clean the TRIQS_COMPILER macros 2013-10-21 15:12:08 +02:00
python arrays: new ref counting and weak views 2013-07-23 08:13:44 +02:00
storages arrays: change operator() && for const_view 2014-03-02 17:11:48 +01:00
algorithms.hpp arrays : revised version of map & fold 2013-09-11 18:39:25 +02:00
array.hpp arrays: change operator() && for const_view 2014-03-02 17:11:48 +01:00
asserts.hpp arrays : revised version of map & fold 2013-09-11 18:39:25 +02:00
cache.hpp arrays: clean cache, add traits ... 2013-11-18 23:41:32 +01:00
CMakeLists.txt First commit : triqs libs version 1.0 alpha1 2013-07-17 19:24:07 +02:00
h5.hpp First commit : triqs libs version 1.0 alpha1 2013-07-17 19:24:07 +02:00
make_immutable_array.hpp clef : new version using lvalues and moving rvalues 2013-09-08 15:04:12 +02:00
mapped_functions.hpp arrays: fix mapped_function (conj overload) 2013-12-30 22:32:15 +01:00
matrix_stack_view.hpp [API change] gf : factories -> constructors 2013-10-21 15:11:44 +02:00
matrix_tensor_proxy.hpp gf: imfreq: fix out of bound product gf imfreq 2014-01-06 19:16:25 +01:00
matrix_view_proxy.hpp [API change] gf : factories -> constructors 2013-10-21 15:11:44 +02:00
matrix.hpp arrays: change operator() && for const_view 2014-03-02 17:11:48 +01:00
vector.hpp arrays: change operator() && for const_view 2014-03-02 17:11:48 +01:00