mirror of
https://github.com/triqs/dft_tools
synced 2024-12-26 14:23:38 +01:00
fc2a620eae
- 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.
12 lines
398 B
Plaintext
12 lines
398 B
Plaintext
With swap
|
|
V = [3,3,3] W = [4,4,4,4] V view [3,3] W view [4,4]
|
|
V = [4,4,4,4] W = [3,3,3] V view [3,3] W view [4,4]
|
|
V = [4,4,4,4] W = [3,3,3] V view [4,4] W view [3,3]
|
|
With std::swap
|
|
V = [3,3,3] W = [4,4,4,4]
|
|
V = [4,4,4,4] W = [3,3,3]
|
|
With deep_swap
|
|
V = [3,3,3] W = [4,4,4] V view [3,3] W view [4,4]
|
|
V = [4,4,4] W = [3,3,3] V view [4,4] W view [3,3]
|
|
V = [3,3,4] W = [4,4,3] V view [3,3] W view [4,4]
|