mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 19:23:45 +01:00
array: add a contructor for reshaping temporary
- add a constructor from indexmap and storage &&, - used when reshaping a temp. array.
This commit is contained in:
parent
6f7deca96a
commit
674797efb3
@ -133,6 +133,11 @@ namespace triqs { namespace arrays {
|
||||
// Move
|
||||
explicit array(array && X) { this->swap_me(X); }
|
||||
|
||||
// from a temporary storage and an indexmap. Used for reshaping a temporary array
|
||||
explicit array(typename indexmap_type::domain_type const & dom, storage_type && sto,
|
||||
memory_layout<Rank> ml = memory_layout<Rank>(IMPL_TYPE::indexmap_type::traversal_order)):
|
||||
IMPL_TYPE(indexmap_type(dom,ml), std::move(sto)){}
|
||||
|
||||
/**
|
||||
* Build a new array from X.domain() and fill it with by evaluating X. X can be :
|
||||
* - another type of array, array_view, matrix,.... (any <IndexMap, Storage> pair)
|
||||
|
Loading…
Reference in New Issue
Block a user