From 41bc8d0338a27e42ff02a28bfb1f4a39be9a2c58 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Tue, 20 Aug 2013 16:15:43 +0200 Subject: [PATCH] changing non_view_type to regular_type - cosmetic : for clarity of the code. --- test/triqs/utility/view_tools.cpp | 2 +- triqs/arrays/array.hpp | 4 ++-- triqs/arrays/blas_lapack/qcache.hpp | 2 +- triqs/arrays/h5/simple_read_write.hpp | 2 +- triqs/arrays/impl/common.hpp | 2 +- triqs/arrays/linalg/det_and_inverse.hpp | 4 ++-- triqs/arrays/linalg/determinant.hpp | 4 ++-- triqs/arrays/linalg/eigenelements.hpp | 4 ++-- triqs/arrays/linalg/inverse.hpp | 4 ++-- triqs/arrays/matrix.hpp | 4 ++-- triqs/arrays/matrix_stack_view.hpp | 2 +- triqs/arrays/storages/mem_block.hpp | 2 +- triqs/arrays/vector.hpp | 4 ++-- triqs/gfs/block.hpp | 2 +- triqs/gfs/gf.hpp | 6 +++--- triqs/gfs/imfreq.hpp | 4 ++-- triqs/gfs/imtime.hpp | 4 ++-- triqs/gfs/legendre.hpp | 2 +- triqs/gfs/local/tail.hpp | 14 +++++++------- triqs/gfs/product.hpp | 2 +- triqs/gfs/re_im_freq.hpp | 2 +- triqs/gfs/re_im_time.hpp | 4 ++-- triqs/gfs/refreq.hpp | 14 +++++++------- triqs/gfs/refreq_imtime.hpp | 4 ++-- triqs/gfs/retime.hpp | 12 ++++++------ triqs/gfs/tools.hpp | 2 +- triqs/gfs/two_real_times.hpp | 2 +- triqs/h5/h5_extractor.hpp | 2 +- triqs/lattice/functors.hpp | 2 +- triqs/python_tools/cython_proxy.hpp | 2 +- triqs/utility/draft/value_view.hpp | 12 ++++++------ triqs/utility/serialization.hpp | 2 +- triqs/utility/tuple_serialize.hpp | 2 +- triqs/utility/view_tools.hpp | 14 +++++++------- 34 files changed, 75 insertions(+), 75 deletions(-) diff --git a/test/triqs/utility/view_tools.cpp b/test/triqs/utility/view_tools.cpp index 0e7d1578..bb7749d3 100644 --- a/test/triqs/utility/view_tools.cpp +++ b/test/triqs/utility/view_tools.cpp @@ -28,7 +28,7 @@ using namespace triqs::utility; template struct check { static_assert(std::is_same::type >::value, "err"); - static_assert(std::is_same::type >::value, "err"); + static_assert(std::is_same::type >::value, "err"); }; int main(int argc, char **argv) { diff --git a/triqs/arrays/array.hpp b/triqs/arrays/array.hpp index 3d47ef37..d3ff72b9 100644 --- a/triqs/arrays/array.hpp +++ b/triqs/arrays/array.hpp @@ -42,7 +42,7 @@ namespace triqs { namespace arrays { public: typedef typename IMPL_TYPE::indexmap_type indexmap_type; typedef typename IMPL_TYPE::storage_type storage_type; - typedef array non_view_type; + typedef array regular_type; typedef array_view view_type; typedef array_view weak_view_type; typedef void has_view_type_tag; @@ -98,7 +98,7 @@ namespace triqs { namespace arrays { typedef typename IMPL_TYPE::value_type value_type; typedef typename IMPL_TYPE::storage_type storage_type; typedef typename IMPL_TYPE::indexmap_type indexmap_type; - typedef array non_view_type; + typedef array regular_type; typedef array_view view_type; typedef array_view weak_view_type; typedef void has_view_type_tag; diff --git a/triqs/arrays/blas_lapack/qcache.hpp b/triqs/arrays/blas_lapack/qcache.hpp index d0024a9c..92d6b6e8 100644 --- a/triqs/arrays/blas_lapack/qcache.hpp +++ b/triqs/arrays/blas_lapack/qcache.hpp @@ -92,7 +92,7 @@ namespace triqs { namespace arrays { namespace blas_lapack_tools { const bool need_copy; A keeper; struct internal_data { - typename A::non_view_type copy_data; + typename A::regular_type copy_data; A view; internal_data(const_qcache const & P) : copy_data(P.keeper), view(copy_data) { #ifdef TRIQS_ARRAYS_CACHE_COPY_VERBOSE diff --git a/triqs/arrays/h5/simple_read_write.hpp b/triqs/arrays/h5/simple_read_write.hpp index 88fd3c01..f1d0be3a 100644 --- a/triqs/arrays/h5/simple_read_write.hpp +++ b/triqs/arrays/h5/simple_read_write.hpp @@ -118,7 +118,7 @@ namespace triqs { namespace arrays { dataspace.getSimpleExtentDims( &dims_out[0], NULL); mini_vector d2; for (size_t u=0; u(A).view(),false);} + if (C_reorder) { read_array(g,name, cache(A).view(),false);} //if (C_reorder) { read_array(g,name, make_cache(A).view(),false);} ds.read( get_array_data_ptr(A), h5::data_type_memory(), data_space(A) , dataspace ); } diff --git a/triqs/arrays/impl/common.hpp b/triqs/arrays/impl/common.hpp index 53648a36..58a40994 100644 --- a/triqs/arrays/impl/common.hpp +++ b/triqs/arrays/impl/common.hpp @@ -75,7 +75,7 @@ namespace triqs { template typename A::view_type make_view(A const & x) { return typename A::view_type(x);} /// Makes a clone - template typename A::non_view_type make_clone(A const & x) { return typename A::non_view_type(x);} + template typename A::regular_type make_clone(A const & x) { return typename A::regular_type(x);} namespace arrays { using triqs::make_clone; diff --git a/triqs/arrays/linalg/det_and_inverse.hpp b/triqs/arrays/linalg/det_and_inverse.hpp index 3c47ba49..d25dc4c4 100644 --- a/triqs/arrays/linalg/det_and_inverse.hpp +++ b/triqs/arrays/linalg/det_and_inverse.hpp @@ -126,7 +126,7 @@ namespace triqs { namespace arrays { friend std::ostream & operator<<(std::ostream & out,inverse_lazy_impl const&x){return out<<"inverse("< M_type; typedef matrix_view M_view_type; M_type M; @@ -174,7 +174,7 @@ namespace triqs { namespace arrays { friend std::ostream & operator<<(std::ostream & out, determinant_lazy const & x){ return out<<"determinant("< worker(M); det = worker.det();} }; diff --git a/triqs/arrays/linalg/determinant.hpp b/triqs/arrays/linalg/determinant.hpp index 9eda54d7..54d587be 100644 --- a/triqs/arrays/linalg/determinant.hpp +++ b/triqs/arrays/linalg/determinant.hpp @@ -126,7 +126,7 @@ namespace triqs { namespace arrays { friend std::ostream & operator<<(std::ostream & out,inverse_lazy_impl const&x){return out<<"inverse("< M_type; typedef matrix_view M_view_type; M_type M; @@ -174,7 +174,7 @@ namespace triqs { namespace arrays { friend std::ostream & operator<<(std::ostream & out, determinant_lazy const & x){ return out<<"determinant("< worker(M); det = worker.det();} }; diff --git a/triqs/arrays/linalg/eigenelements.hpp b/triqs/arrays/linalg/eigenelements.hpp index 7feca680..eff02310 100644 --- a/triqs/arrays/linalg/eigenelements.hpp +++ b/triqs/arrays/linalg/eigenelements.hpp @@ -81,7 +81,7 @@ namespace triqs { namespace arrays { namespace linalg { protected: eigenelements_worker_base ( matrix_view the_matrix) : eigenelements_worker_base (the_matrix) {this->compz='V'; } public: - typename matrix_view::non_view_type vectors() const { + typename matrix_view::regular_type vectors() const { if (!this->has_run) TRIQS_RUNTIME_ERROR<<"eigenelements_worker has not been invoked !"; return this->mat; } @@ -153,7 +153,7 @@ namespace triqs { namespace arrays { namespace linalg { * if true : a copy is made, M is preserved, but of course it is slower... */ template - std::pair, typename MatrixViewType::non_view_type> eigenelements( MatrixViewType const & M, bool take_copy =false) { + std::pair, typename MatrixViewType::regular_type> eigenelements( MatrixViewType const & M, bool take_copy =false) { eigenelements_worker W(take_copy ? MatrixViewType(make_clone(M)) : M); W.invoke(); return std::make_pair(W.values(),W.vectors()); diff --git a/triqs/arrays/linalg/inverse.hpp b/triqs/arrays/linalg/inverse.hpp index 17363213..e8856ff2 100644 --- a/triqs/arrays/linalg/inverse.hpp +++ b/triqs/arrays/linalg/inverse.hpp @@ -126,7 +126,7 @@ namespace triqs { namespace arrays { friend std::ostream & operator<<(std::ostream & out,inverse_lazy_impl const&x){return out<<"inverse("< M_type; typedef matrix_view M_view_type; M_type M; @@ -174,7 +174,7 @@ namespace triqs { namespace arrays { friend std::ostream & operator<<(std::ostream & out, determinant_lazy const & x){ return out<<"determinant("< worker(M); det = worker.det();} }; diff --git a/triqs/arrays/matrix.hpp b/triqs/arrays/matrix.hpp index 21bb2ac8..18a983da 100644 --- a/triqs/arrays/matrix.hpp +++ b/triqs/arrays/matrix.hpp @@ -51,7 +51,7 @@ namespace triqs { namespace arrays { template class matrix_view : Tag::matrix_view, TRIQS_MODEL_CONCEPT(MutableMatrix), public IMPL_TYPE { public : - typedef matrix non_view_type; + typedef matrix regular_type; typedef matrix_view view_type; typedef matrix_view weak_view_type; typedef void has_view_type_tag; @@ -113,7 +113,7 @@ namespace triqs { namespace arrays { typedef typename IMPL_TYPE::value_type value_type; typedef typename IMPL_TYPE::storage_type storage_type; typedef typename IMPL_TYPE::indexmap_type indexmap_type; - typedef matrix non_view_type; + typedef matrix regular_type; typedef matrix_view view_type; typedef matrix_view weak_view_type; typedef void has_view_type_tag; diff --git a/triqs/arrays/matrix_stack_view.hpp b/triqs/arrays/matrix_stack_view.hpp index ae4384d9..b21e7c36 100644 --- a/triqs/arrays/matrix_stack_view.hpp +++ b/triqs/arrays/matrix_stack_view.hpp @@ -65,7 +65,7 @@ namespace triqs { namespace arrays { void invert() {for (size_t i=0; i const & L, matrix_stack_view const & M, matrix_view const & R) { - matrix_stack_view res (typename array_view_t::non_view_type (M.size(), L.dim0(), R.dim1())); + matrix_stack_view res (typename array_view_t::regular_type (M.size(), L.dim0(), R.dim1())); for (size_t i=0; i DISABLE_IFC(Weak) dec_ref(mem_block * const m) { m->ref_count--; if (m->ref_count ==0) { #ifdef TRIQS_ARRAYS_CHECK_WEAK_REFS - std::cout << " detroying "<< m->weak_ref_count <weak_ref_count <weak_ref_count !=0) TRIQS_RUNTIME_ERROR << "Deleting an memory block of an array with still "<< m->weak_ref_count<< " weak references"; #endif delete m; diff --git a/triqs/arrays/vector.hpp b/triqs/arrays/vector.hpp index 08d3f6bb..960bf365 100644 --- a/triqs/arrays/vector.hpp +++ b/triqs/arrays/vector.hpp @@ -40,7 +40,7 @@ namespace triqs { namespace arrays { template class vector_view : Tag::vector_view, TRIQS_MODEL_CONCEPT(MutableVector), public IMPL_TYPE { public : - typedef vector non_view_type; + typedef vector regular_type; typedef vector_view view_type; typedef vector_view weak_view_type; typedef void has_view_type_tag; @@ -107,7 +107,7 @@ namespace triqs { namespace arrays { typedef typename IMPL_TYPE::value_type value_type; typedef typename IMPL_TYPE::storage_type storage_type; typedef typename IMPL_TYPE::indexmap_type indexmap_type; - typedef vector non_view_type; + typedef vector regular_type; typedef vector_view view_type; typedef vector_view weak_view_type; typedef void has_view_type_tag; diff --git a/triqs/gfs/block.hpp b/triqs/gfs/block.hpp index 2d057616..c8c20d59 100644 --- a/triqs/gfs/block.hpp +++ b/triqs/gfs/block.hpp @@ -56,7 +56,7 @@ namespace triqs { namespace gfs { /// --------------------------- data access --------------------------------- - template struct data_proxy : data_proxy_vector ::type>{}; + template struct data_proxy : data_proxy_vector ::type>{}; // ------------------------------- Factories -------------------------------------------------- diff --git a/triqs/gfs/gf.hpp b/triqs/gfs/gf.hpp index 96f140aa..e05d6ba2 100644 --- a/triqs/gfs/gf.hpp +++ b/triqs/gfs/gf.hpp @@ -98,7 +98,7 @@ namespace triqs { namespace gfs { // Pattern : ValueView typedef gf_view view_type; - typedef gf non_view_type; + typedef gf regular_type; typedef gf_desc descriptor_t; @@ -113,9 +113,9 @@ namespace triqs { namespace gfs { typedef gfs_implementation::evaluator evaluator_t; typedef gfs_implementation::data_proxy data_proxy_t; - typedef typename data_proxy_t::storage_t data_non_view_t; + typedef typename data_proxy_t::storage_t data_regular_t; typedef typename data_proxy_t::storage_view_t data_view_t; - typedef typename std::conditional::type data_t; + typedef typename std::conditional::type data_t; typedef typename gfs_implementation::singularity::type singularity_non_view_t; typedef typename view_type_if_exists_else_type::type singularity_view_t; diff --git a/triqs/gfs/imfreq.hpp b/triqs/gfs/imfreq.hpp index 535e4bcd..bf5a9b3c 100644 --- a/triqs/gfs/imfreq.hpp +++ b/triqs/gfs/imfreq.hpp @@ -75,7 +75,7 @@ namespace triqs { namespace gfs { template static gf_t make_gf(MeshType && m, tqa::mini_vector shape, local::tail_view const & t) { - typename gf_t::data_non_view_t A(shape.front_append(m.size())); A() =0; + typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0; return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; } static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector shape) { @@ -95,7 +95,7 @@ namespace triqs { namespace gfs { template static gf_t make_gf(MeshType && m, local::tail_view const & t) { - typename gf_t::data_non_view_t A(m.size()); A() =0; + typename gf_t::data_regular_t A(m.size()); A() =0; return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; } static gf_t make_gf(double beta, statistic_enum S) { diff --git a/triqs/gfs/imtime.hpp b/triqs/gfs/imtime.hpp index 30b46aea..79377453 100644 --- a/triqs/gfs/imtime.hpp +++ b/triqs/gfs/imtime.hpp @@ -130,7 +130,7 @@ namespace triqs { namespace gfs { typedef gf gf_t; template static gf_t make_gf(MeshType && m, tqa::mini_vector shape, local::tail_view const & t) { - typename gf_t::data_non_view_t A(shape.front_append(m.size())); A() =0; + typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0; //return gf_t ( m, std::move(A), t, nothing() ) ; return gf_t (std::forward(m), std::move(A), t, nothing(), evaluator(shape[0],shape[1]) ) ; } @@ -147,7 +147,7 @@ namespace triqs { namespace gfs { typedef gf gf_t; template static gf_t make_gf(MeshType && m, local::tail_view const & t) { - typename gf_t::data_non_view_t A(m.size()); A() =0; + typename gf_t::data_regular_t A(m.size()); A() =0; return gf_t (std::forward(m), std::move(A), t, nothing()); } static gf_t make_gf(double beta, statistic_enum S, size_t Nmax=1025, mesh_kind mk= half_bins) { diff --git a/triqs/gfs/legendre.hpp b/triqs/gfs/legendre.hpp index c0e4c240..53b6b1d5 100644 --- a/triqs/gfs/legendre.hpp +++ b/triqs/gfs/legendre.hpp @@ -65,7 +65,7 @@ namespace triqs { namespace gfs { typedef typename mesh::type mesh_t; static gf_t make_gf(double beta, statistic_enum S, tqa::mini_vector shape, size_t n_leg) { - typename gf_t::data_non_view_t A(shape.front_append(n_leg)); A() = 0; + typename gf_t::data_regular_t A(shape.front_append(n_leg)); A() = 0; return gf_t(mesh::make(beta, S, n_leg), std::move(A), nothing(), nothing()); } diff --git a/triqs/gfs/local/tail.hpp b/triqs/gfs/local/tail.hpp index febf6b1e..d0c34254 100644 --- a/triqs/gfs/local/tail.hpp +++ b/triqs/gfs/local/tail.hpp @@ -52,15 +52,15 @@ namespace triqs { namespace gfs { namespace local { public : typedef void has_view_type_tag; // Idiom : ValueView typedef tail_view view_type; - typedef tail non_view_type; + typedef tail regular_type; - typedef arrays::array data_non_view_type; + typedef arrays::array data_regular_type; typedef arrays::array_view data_view_type; - typedef typename mpl::if_c::type data_type; + typedef typename mpl::if_c::type data_type; - typedef arrays::array mask_non_view_type; + typedef arrays::array mask_regular_type; typedef arrays::array_view mask_view_type; - typedef typename mpl::if_c::type mask_type; + typedef typename mpl::if_c::type mask_type; typedef arrays::matrix_view mv_type; typedef arrays::matrix_view const_mv_type; @@ -116,13 +116,13 @@ namespace triqs { namespace gfs { namespace local { const_mv_type operator() (int n) const { if (n>this->order_max()) TRIQS_RUNTIME_ERROR<<" n > Max Order. n= "< static gf_t make_gf(MeshType && m, tqa::mini_vector shape, local::tail_view const & t) { - typename gf_t::data_non_view_t A(shape.front_append(m.size())); A() =0; + typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0; return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; } static gf_t make_gf(double wmin, double wmax, size_t n_freq, tqa::mini_vector shape) { - typename gf_t::data_non_view_t A(shape.front_append(n_freq)); A() =0; + typename gf_t::data_regular_t A(shape.front_append(n_freq)); A() =0; return gf_t(mesh::make(wmin, wmax, n_freq, full_bins), std::move(A), local::tail(shape), nothing()); } static gf_t make_gf(double wmin, double wmax, size_t n_freq, tqa::mini_vector shape, mesh_kind mk) { - typename gf_t::data_non_view_t A(shape.front_append(n_freq)); A() =0; + typename gf_t::data_regular_t A(shape.front_append(n_freq)); A() =0; return gf_t(mesh::make(wmin, wmax, n_freq, mk), std::move(A), local::tail(shape), nothing()); } }; @@ -98,17 +98,17 @@ namespace triqs { namespace gfs { template static gf_t make_gf(MeshType && m, local::tail_view const & t) { - typename gf_t::data_non_view_t A(m.size()); A() =0; + typename gf_t::data_regular_t A(m.size()); A() =0; return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; } static gf_t make_gf(double wmin, double wmax, size_t n_freq) { - typename gf_t::data_non_view_t A(n_freq); A() =0; + typename gf_t::data_regular_t A(n_freq); A() =0; return gf_t(mesh::make(wmin, wmax, n_freq), std::move(A), local::tail(tqa::mini_vector(1,1)), nothing()); } static gf_t make_gf(double wmin, double wmax, size_t n_freq, mesh_kind mk) { - typename gf_t::data_non_view_t A(n_freq); A() =0; + typename gf_t::data_regular_t A(n_freq); A() =0; return gf_t(mesh::make(wmin, wmax, n_freq, mk), std::move(A), local::tail(tqa::mini_vector(1,1)), nothing()); } diff --git a/triqs/gfs/refreq_imtime.hpp b/triqs/gfs/refreq_imtime.hpp index 796baebd..b2970b65 100644 --- a/triqs/gfs/refreq_imtime.hpp +++ b/triqs/gfs/refreq_imtime.hpp @@ -83,14 +83,14 @@ namespace triqs { namespace gfs { template static gf_t make_gf(MeshType && m) { - typename gf_t::data_non_view_t A(m.size()); + typename gf_t::data_regular_t A(m.size()); A() =0; return gf_t (m, std::move(A), nothing(), nothing() ) ; } static gf_t make_gf(double wmin, double wmax, size_t n_freq, double beta, statistic_enum S, size_t nt, mesh_kind mk=full_bins) { auto m = make_gf_mesh(wmin, wmax, n_freq, beta,S, nt, mk); - typename gf_t::data_non_view_t A(m.size()); + typename gf_t::data_regular_t A(m.size()); A() =0; return gf_t (m, std::move(A), nothing(), nothing() ) ; } diff --git a/triqs/gfs/retime.hpp b/triqs/gfs/retime.hpp index dbddfa8f..e91b5354 100644 --- a/triqs/gfs/retime.hpp +++ b/triqs/gfs/retime.hpp @@ -79,17 +79,17 @@ namespace triqs { namespace gfs { template static gf_t make_gf(MeshType && m, tqa::mini_vector shape, local::tail_view const t) { - typename gf_t::data_non_view_t A(shape.front_append(m.size())); A() =0; + typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0; return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; } static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector shape, mesh_kind mk) { - typename gf_t::data_non_view_t A(shape.front_append(n_points)); A() =0; + typename gf_t::data_regular_t A(shape.front_append(n_points)); A() =0; return gf_t(mesh::make(tmin, tmax, n_points,mk), std::move(A), local::tail(shape), nothing()); } static gf_t make_gf(double tmin, double tmax, size_t n_points, tqa::mini_vector shape) { - typename gf_t::data_non_view_t A(shape.front_append(n_points)); A() =0; + typename gf_t::data_regular_t A(shape.front_append(n_points)); A() =0; return gf_t(mesh::make(tmin, tmax, n_points), std::move(A), local::tail(shape), nothing()); } @@ -101,17 +101,17 @@ namespace triqs { namespace gfs { template static gf_t make_gf(MeshType && m, local::tail_view const t) { - typename gf_t::data_non_view_t A(m.size()); A() =0; + typename gf_t::data_regular_t A(m.size()); A() =0; return gf_t ( std::forward(m), std::move(A), t, nothing() ) ; } static gf_t make_gf(double tmin, double tmax, size_t n_points, mesh_kind mk) { - typename gf_t::data_non_view_t A(n_points); A() =0; + typename gf_t::data_regular_t A(n_points); A() =0; return gf_t(mesh::make(tmin, tmax, n_points,mk), std::move(A), local::tail(tqa::mini_vector(1,1)), nothing()); } static gf_t make_gf(double tmin, double tmax, size_t n_points) { - typename gf_t::data_non_view_t A(n_points); A() =0; + typename gf_t::data_regular_t A(n_points); A() =0; return gf_t(mesh::make(tmin, tmax, n_points), std::move(A), local::tail(tqa::mini_vector(1,1)), nothing()); } diff --git a/triqs/gfs/tools.hpp b/triqs/gfs/tools.hpp index c53722f8..a9d0ebe8 100644 --- a/triqs/gfs/tools.hpp +++ b/triqs/gfs/tools.hpp @@ -76,7 +76,7 @@ namespace triqs { namespace gfs { nothing() {} typedef void has_view_type_tag; // Idiom : ValueView typedef nothing view_type; - typedef nothing non_view_type; + typedef nothing regular_type; void rebind (nothing){} template< typename RHS> void operator=(RHS && ) {} friend void h5_write (h5::group, std::string subgroup_name, nothing ) {} diff --git a/triqs/gfs/two_real_times.hpp b/triqs/gfs/two_real_times.hpp index d21b8d07..513bef2d 100644 --- a/triqs/gfs/two_real_times.hpp +++ b/triqs/gfs/two_real_times.hpp @@ -95,7 +95,7 @@ namespace triqs { namespace gfs { static gf_t make_gf(double tmax, double n_time_slices, tqa::mini_vector shape) { auto m = mesh::make(tmax, n_time_slices); - typename gf_t::data_non_view_t A(shape.front_append(m.size())); A() =0; + typename gf_t::data_regular_t A(shape.front_append(m.size())); A() =0; return gf_t (m, std::move(A), nothing(), nothing() ) ; } }; diff --git a/triqs/h5/h5_extractor.hpp b/triqs/h5/h5_extractor.hpp index 8e7b621d..50d816a1 100644 --- a/triqs/h5/h5_extractor.hpp +++ b/triqs/h5/h5_extractor.hpp @@ -31,7 +31,7 @@ namespace triqs { namespace h5 { template struct h5_extractor { typename view_type_if_exists_else_type::type operator() (group fg, std::string const & subgroup_name) const { - typename non_view_type_if_exists_else_type::type r; + typename regular_type_if_exists_else_type::type r; h5_read(fg,subgroup_name,r); return r; } diff --git a/triqs/lattice/functors.hpp b/triqs/lattice/functors.hpp index 34781446..53423770 100644 --- a/triqs/lattice/functors.hpp +++ b/triqs/lattice/functors.hpp @@ -52,7 +52,7 @@ namespace triqs { namespace lattice_tools { brillouin_zone bz_; // deduce the return type from decltype(begin()->second) public: - typedef typename non_view_type_if_exists_else_type< decltype(f.begin()->second)>::type return_construct_type; + typedef typename regular_type_if_exists_else_type< decltype(f.begin()->second)>::type return_construct_type; typedef typename view_type_if_exists_else_type::type return_type; typedef K_view_type arg_type; diff --git a/triqs/python_tools/cython_proxy.hpp b/triqs/python_tools/cython_proxy.hpp index c50ccb4b..2594f1f1 100644 --- a/triqs/python_tools/cython_proxy.hpp +++ b/triqs/python_tools/cython_proxy.hpp @@ -29,7 +29,7 @@ namespace triqs { namespace python_tools { // This class must be friend of V, to use the private default constructor. template class cython_proxy : public V { public: - cython_proxy() : V(typename V::non_view_type()) {} + cython_proxy() : V(typename V::regular_type()) {} cython_proxy(V const &v) : V(v){}; cython_proxy(cython_proxy const & cp) : V(cp) {}; template explicit cython_proxy(Args && ... args) : V (std::forward(args)...){} diff --git a/triqs/utility/draft/value_view.hpp b/triqs/utility/draft/value_view.hpp index d57eac5b..129058ed 100644 --- a/triqs/utility/draft/value_view.hpp +++ b/triqs/utility/draft/value_view.hpp @@ -37,9 +37,9 @@ namespace triqs { public: typedef void has_view_type_tag; // Idiom : ValueView typedef value_view view_type; - typedef value_view non_view_type; + typedef value_view regular_type; typedef typename std::remove_cv::type >::type value_type; - value_view( non_view_type const & a) { p = a.p;} + value_view( regular_type const & a) { p = a.p;} value_view( view_type const & a) { p = a.p;} void rebind( view_type const &X) { p = X.p; } @@ -48,7 +48,7 @@ namespace triqs { operator T() { return *p;} operator T const() const { return *p;} value_view & operator=(view_type const & x) { if (!p) rebind(x); else { *p = *x.p;} return *this;} - value_view & operator=(non_view_type const & x) { if (!p) rebind(x); else { *p = *x.p;} return *this;} + value_view & operator=(regular_type const & x) { if (!p) rebind(x); else { *p = *x.p;} return *this;} value_view & operator=(T const & x) { *p = x; return *this;} friend void h5_write (arrays::h5::group_or_file fg, std::string p, value_view const & v) { h5_write(fg,p,v()); } @@ -68,9 +68,9 @@ namespace triqs { public: typedef void has_view_type_tag; // Idiom : ValueView typedef value_view view_type; - typedef value_view non_view_type; + typedef value_view regular_type; typedef typename std::remove_cv::type >::type value_type; - value_view( non_view_type const & a) { p = std::make_shared(*a.p);} + value_view( regular_type const & a) { p = std::make_shared(*a.p);} value_view( view_type const & a) { p = std::make_shared(*a.p);} template explicit value_view(Args&&... args) {p = std::make_shared(std::forward(args)...);} T & operator()() { return *p;} @@ -78,7 +78,7 @@ namespace triqs { operator T() { return *p;} operator T const() const { return *p;} value_view& operator=(view_type const & x) { *p = *x.p;return *this;} - value_view& operator=(non_view_type const & x) { *p = *x.p;return *this;} + value_view& operator=(regular_type const & x) { *p = *x.p;return *this;} value_view& operator=(T const & x) { *p = x; return *this;} friend void h5_write (arrays::h5::group_or_file fg, std::string p, value_view const & v) { h5_write(fg,p,v()); } diff --git a/triqs/utility/serialization.hpp b/triqs/utility/serialization.hpp index 1afa726b..7fb547af 100644 --- a/triqs/utility/serialization.hpp +++ b/triqs/utility/serialization.hpp @@ -60,7 +60,7 @@ namespace triqs { } template void deserialize_into_view (std::string const & serial_str, T & x) { - typename non_view_type_if_exists_else_type::type obj; + typename regular_type_if_exists_else_type::type obj; // wrap buffer inside a stream and deserialize serial_str into obj boost::iostreams::basic_array_source device(serial_str.data(), serial_str.size()); boost::iostreams::stream > s(device); diff --git a/triqs/utility/tuple_serialize.hpp b/triqs/utility/tuple_serialize.hpp index 4fcf02db..1a5ef24c 100644 --- a/triqs/utility/tuple_serialize.hpp +++ b/triqs/utility/tuple_serialize.hpp @@ -51,4 +51,4 @@ void serialize(Archive & ar, std::tuple & t, const unsigned int } // namespace serialization } // namespace boost -#endif \ No newline at end of file +#endif diff --git a/triqs/utility/view_tools.hpp b/triqs/utility/view_tools.hpp index 63d3095f..62b66c8e 100644 --- a/triqs/utility/view_tools.hpp +++ b/triqs/utility/view_tools.hpp @@ -30,11 +30,11 @@ namespace triqs { template void nop(T ...){}; template struct has_view : std::false_type {}; - template struct has_view(),std::declval()))> : std::true_type {}; + template struct has_view(),std::declval()))> : std::true_type {}; - template::value> struct non_view_type_if_exists_else_type; - template struct non_view_type_if_exists_else_type {typedef T type;}; - template struct non_view_type_if_exists_else_type {typedef typename T::non_view_type type;}; + template::value> struct regular_type_if_exists_else_type; + template struct regular_type_if_exists_else_type {typedef T type;}; + template struct regular_type_if_exists_else_type {typedef typename T::regular_type type;}; template::value> struct view_type_if_exists_else_type; template struct view_type_if_exists_else_type {typedef T type;}; @@ -47,8 +47,8 @@ namespace triqs { #else - template struct non_view_type_if_exists_else_type {typedef T type;}; - template struct non_view_type_if_exists_else_type {typedef typename T::non_view_type type;}; + template struct regular_type_if_exists_else_type {typedef T type;}; + template struct regular_type_if_exists_else_type {typedef typename T::regular_type type;}; template struct view_type_if_exists_else_type {typedef T type;}; template struct view_type_if_exists_else_type {typedef typename T::view_type type;}; @@ -62,7 +62,7 @@ namespace triqs { // replacement of std::plus for views ... template struct add_views : std::binary_function { T operator() (const T& x, const T& y) const - { typename T::non_view_type r(x); r =r + y; return r;} + { typename T::regular_type r(x); r =r + y; return r;} };