3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-01 03:33:50 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Olivier Parcollet
8c725f8d5e Work on compilation speed.
- h5/make_h5.... only used in parameters.
- old boost includes before C++11
- remove boost serialization, make macro TRIQS_MAKE_NVP temporarely
- remove boost::is_complex (can be written in 2 lines...)
- move some lib in cpp
2014-05-02 20:49:19 +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
Olivier Parcollet
76e39c826f arrays: add make_unit_matrix and norm2, norm2_sqr 2014-02-18 15:36:24 +01:00
Olivier Parcollet
1d929c1a91 arrays: add rebind const_view from view
- also add some static assert to forbid += and co on const_view
2013-10-22 21:29:27 +02:00
Olivier Parcollet
9002c1e456 implement array_const_view 2013-10-21 15:12:53 +02:00
Olivier Parcollet
3b29e9bf9d arrays : renaming concept name
CuboidArray <-> Array
added make_cuboid_domain
2013-08-29 18:06:04 +02:00
Olivier Parcollet
3d6c030b1f arrays : correct deletion of std::swap for views
- forgot the bool flags, in case a weak view is involved.
2013-08-27 13:43:58 +02:00
Olivier Parcollet
f78e6baf9e code cleaning
- TRIQS_MODEL_CONCEPT renamed : clearer for doc
- index_value_type : remove, useless...
2013-08-27 13:43:58 +02:00
Olivier Parcollet
17a741ad9e arrays: rm has_view_type_tag & add_views
- has_view_type_tag mechanism was replaced by a decltype long ago.
Cleaning since it seems to work on all supported compiler now.

- removed add_views : not used any more.
2013-08-27 13:43:57 +02:00
Olivier Parcollet
41bc8d0338 changing non_view_type to regular_type
- cosmetic : for clarity of the code.
2013-08-27 13:43:57 +02:00
Olivier Parcollet
157b014ad8 arrays/vector: little correction on = std::vector
- forgot the borrowed flag.
simple consequence of the weak view change.
2013-07-25 15:19:54 +02:00
Olivier Parcollet
fc2a620eae arrays: new ref counting and weak views
- improve the mem_block and shared_block.
- the reference counting is now done in the mem_block and shared_block, removing the need of shared_ptr.

- speed tests shows that shared_ptr is very slow (due to thread safety?)
the new version is much better, though not perfect.

- Hence introducing weak views.

- also :
-- clean the guard mechanism for python (to allow returning from python without any python ref left).
-- clean code, add documentation for mem_block
-- remove nan init, which was not working, and corresponding test
-- serialisation of view still unchanged (need to forbid serialization of view ??).

- tests ok, incl. valgrind tests.
2013-07-23 08:13:44 +02:00
Olivier Parcollet
f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00