diff --git a/src/TiledArray/array_impl.cpp b/src/TiledArray/array_impl.cpp index f52af6d649..7e1340322f 100644 --- a/src/TiledArray/array_impl.cpp +++ b/src/TiledArray/array_impl.cpp @@ -28,31 +28,23 @@ namespace TiledArray { namespace detail { -template class ArrayImpl >, - DensePolicy>; -template class ArrayImpl >, - DensePolicy>; -template class ArrayImpl >, - DensePolicy>; -template class ArrayImpl >, - DensePolicy>; -// template class ArrayImpl, -// Eigen::aligned_allocator > >, DensePolicy>; template -// class ArrayImpl, -// Eigen::aligned_allocator > >, DensePolicy> +template class ArrayImpl, DensePolicy>; +template class ArrayImpl, DensePolicy>; +// template class ArrayImpl, +// DensePolicy>; +// template class ArrayImpl, +// DensePolicy>; +template class ArrayImpl>, DensePolicy>; +template class ArrayImpl>, DensePolicy>; -template class ArrayImpl >, - SparsePolicy>; -template class ArrayImpl >, - SparsePolicy>; -template class ArrayImpl >, - SparsePolicy>; -template class ArrayImpl >, - SparsePolicy>; -// template class ArrayImpl, -// Eigen::aligned_allocator > >, SparsePolicy>; template -// class ArrayImpl, -// Eigen::aligned_allocator > >, SparsePolicy>; +template class ArrayImpl, SparsePolicy>; +template class ArrayImpl, SparsePolicy>; +// template class ArrayImpl, +// SparsePolicy>; +// template class ArrayImpl, +// SparsePolicy>; +template class ArrayImpl>, SparsePolicy>; +template class ArrayImpl>, SparsePolicy>; } // namespace detail } // namespace TiledArray diff --git a/src/TiledArray/array_impl.h b/src/TiledArray/array_impl.h index 610ba275e9..25ed454949 100644 --- a/src/TiledArray/array_impl.h +++ b/src/TiledArray/array_impl.h @@ -644,33 +644,23 @@ class ArrayImpl : public TensorImpl { #ifndef TILEDARRAY_HEADER_ONLY -extern template class ArrayImpl< - Tensor>, DensePolicy>; -extern template class ArrayImpl>, - DensePolicy>; -extern template class ArrayImpl>, - DensePolicy>; -extern template class ArrayImpl>, - DensePolicy>; -// extern template -// class ArrayImpl, -// Eigen::aligned_allocator > >, DensePolicy>; extern -// template class ArrayImpl, -// Eigen::aligned_allocator > >, DensePolicy>; - -extern template class ArrayImpl< - Tensor>, SparsePolicy>; -extern template class ArrayImpl>, - SparsePolicy>; -extern template class ArrayImpl>, - SparsePolicy>; -extern template class ArrayImpl>, - SparsePolicy>; -// extern template -// class ArrayImpl, -// Eigen::aligned_allocator > >, SparsePolicy>; extern -// template class ArrayImpl, -// Eigen::aligned_allocator > >, SparsePolicy>; +extern template class ArrayImpl, DensePolicy>; +extern template class ArrayImpl, DensePolicy>; +// extern template class ArrayImpl, +// DensePolicy>; +// extern template class ArrayImpl, +// DensePolicy>; +extern template class ArrayImpl>, DensePolicy>; +extern template class ArrayImpl>, DensePolicy>; + +extern template class ArrayImpl, SparsePolicy>; +extern template class ArrayImpl, SparsePolicy>; +// extern template class ArrayImpl, +// SparsePolicy>; +// extern template class ArrayImpl, +// SparsePolicy>; +extern template class ArrayImpl>, SparsePolicy>; +extern template class ArrayImpl>, SparsePolicy>; #endif // TILEDARRAY_HEADER_ONLY diff --git a/src/TiledArray/conversions/foreach.h b/src/TiledArray/conversions/foreach.h index 5a3011d7fb..f54d8b4682 100644 --- a/src/TiledArray/conversions/foreach.h +++ b/src/TiledArray/conversions/foreach.h @@ -277,8 +277,7 @@ inline std:: tiles.reserve(arg.pmap()->size()); // Construct a tensor to hold updated tile norms for the result shape. - TiledArray::Tensor> + TiledArray::Tensor tile_norms(arg.trange().tiles_range(), 0); // Construct the task function used to construct the result tiles. diff --git a/src/TiledArray/conversions/make_array.h b/src/TiledArray/conversions/make_array.h index bb9786bbb0..db03091d3c 100644 --- a/src/TiledArray/conversions/make_array.h +++ b/src/TiledArray/conversions/make_array.h @@ -146,9 +146,7 @@ inline Array make_array(World& world, const detail::trange_t& trange, tiles.reserve(pmap->size()); // Construct a tensor to hold updated tile norms for the result shape. - TiledArray::Tensor< - typename detail::shape_t::value_type, - Eigen::aligned_allocator::value_type> > + TiledArray::Tensor::value_type> tile_norms(trange.tiles_range(), 0); // Construct the task function used to construct the result tiles. diff --git a/src/TiledArray/dist_array.cpp b/src/TiledArray/dist_array.cpp index 019436722e..ef8184f5a4 100644 --- a/src/TiledArray/dist_array.cpp +++ b/src/TiledArray/dist_array.cpp @@ -31,30 +31,22 @@ namespace TiledArray { -template class DistArray >, - DensePolicy>; -template class DistArray >, - DensePolicy>; -template class DistArray >, - DensePolicy>; -template class DistArray >, - DensePolicy>; -// template class DistArray, -// Eigen::aligned_allocator > >, DensePolicy>; template -// class DistArray, -// Eigen::aligned_allocator > >, DensePolicy>; +template class DistArray, DensePolicy>; +template class DistArray, DensePolicy>; +// template class DistArray, +// DensePolicy>; +// template class DistArray, +// DensePolicy>; +template class DistArray>, DensePolicy>; +template class DistArray>, DensePolicy>; -template class DistArray >, - SparsePolicy>; -template class DistArray >, - SparsePolicy>; -template class DistArray >, - SparsePolicy>; -template class DistArray >, - SparsePolicy>; -// template class DistArray, -// Eigen::aligned_allocator > >, SparsePolicy>; template -// class DistArray, -// Eigen::aligned_allocator > >, SparsePolicy>; +template class DistArray, SparsePolicy>; +template class DistArray, SparsePolicy>; +// template class DistArray, +// SparsePolicy>; +// template class DistArray, +// SparsePolicy>; +template class DistArray>, SparsePolicy>; +template class DistArray>, SparsePolicy>; } // namespace TiledArray diff --git a/src/TiledArray/dist_array.h b/src/TiledArray/dist_array.h index 2967800abe..03be325d05 100644 --- a/src/TiledArray/dist_array.h +++ b/src/TiledArray/dist_array.h @@ -49,7 +49,7 @@ class Tensor; /// used to construct distributed tensor algebraic operations. /// \tparam T The element type of for array tiles /// \tparam Tile The tile type [ Default = \c Tensor ] -template >, +template , typename Policy = DensePolicy> class DistArray : public madness::archive::ParallelSerializableObject { public: @@ -1555,33 +1555,23 @@ madness::AtomicInt DistArray::cleanup_counter_; #ifndef TILEDARRAY_HEADER_ONLY -extern template class DistArray< - Tensor>, DensePolicy>; -extern template class DistArray>, - DensePolicy>; -extern template class DistArray>, - DensePolicy>; -extern template class DistArray>, - DensePolicy>; -// extern template -// class DistArray, -// Eigen::aligned_allocator > >, DensePolicy>; extern -// template class DistArray, -// Eigen::aligned_allocator > >, DensePolicy> - -extern template class DistArray< - Tensor>, SparsePolicy>; -extern template class DistArray>, - SparsePolicy>; -extern template class DistArray>, - SparsePolicy>; -extern template class DistArray>, - SparsePolicy>; -// extern template -// class DistArray, -// Eigen::aligned_allocator > >, SparsePolicy>; extern -// template class DistArray, -// Eigen::aligned_allocator > >, SparsePolicy>; +extern template class DistArray, DensePolicy>; +extern template class DistArray, DensePolicy>; +// extern template class DistArray, +// DensePolicy>; +// extern template class DistArray, +// DensePolicy>; +extern template class DistArray>, DensePolicy>; +extern template class DistArray>, DensePolicy>; + +extern template class DistArray, SparsePolicy>; +extern template class DistArray, SparsePolicy>; +// extern template class DistArray, +// SparsePolicy>; +// extern template class DistArray, +// SparsePolicy>; +extern template class DistArray>, SparsePolicy>; +extern template class DistArray>, SparsePolicy>; #endif // TILEDARRAY_HEADER_ONLY diff --git a/src/TiledArray/fwd.h b/src/TiledArray/fwd.h index 3863ad6d7e..b53626333e 100644 --- a/src/TiledArray/fwd.h +++ b/src/TiledArray/fwd.h @@ -25,6 +25,8 @@ #include #include +// #include // fwddecl for std::allocator + namespace Eigen { // fwd define Eigen's aligned allocator for // TiledArray::Tensor template @@ -32,7 +34,7 @@ class aligned_allocator; } // namespace Eigen namespace madness { - class World; +class World; } namespace TiledArray { @@ -44,25 +46,23 @@ World& get_default_world(); class Range; class TiledRange1; class TiledRange; +class BlockRange; // TiledArray Policy class DensePolicy; class SparsePolicy; // TiledArray Tensors -template +template /* std::allocator */> class Tensor; -typedef Tensor > TensorD; -typedef Tensor > TensorI; -typedef Tensor > TensorF; -typedef Tensor > TensorL; -typedef Tensor, - Eigen::aligned_allocator > > - TensorZ; -typedef Tensor, - Eigen::aligned_allocator > > - TensorC; +typedef Tensor TensorD; +typedef Tensor TensorI; +typedef Tensor TensorF; +typedef Tensor TensorL; +typedef Tensor> TensorZ; +typedef Tensor> TensorC; // CUDA tensor #ifdef TILEDARRAY_HAS_CUDA @@ -90,35 +90,43 @@ using btasUMTensorVarray = #endif +template +class Tile; + +class Permutation; +class BipartitePermutation; + +namespace symmetry { +class Permutation; +} + // TiledArray Arrays template class DistArray; // Dense Array Typedefs template -using TArray = DistArray >, DensePolicy>; +using TArray = DistArray, DensePolicy>; typedef TArray TArrayD; typedef TArray TArrayI; typedef TArray TArrayF; typedef TArray TArrayL; -typedef TArray > TArrayZ; -typedef TArray > TArrayC; +typedef TArray> TArrayZ; +typedef TArray> TArrayC; // Sparse Array Typedefs template -using TSpArray = - DistArray >, SparsePolicy>; +using TSpArray = DistArray, SparsePolicy>; typedef TSpArray TSpArrayD; typedef TSpArray TSpArrayI; typedef TSpArray TSpArrayF; typedef TSpArray TSpArrayL; -typedef TSpArray > TSpArrayZ; -typedef TSpArray > TSpArrayC; +typedef TSpArray> TSpArrayZ; +typedef TSpArray> TSpArrayC; // type alias for backward compatibility: the old Array has static type, // DistArray is rank-polymorphic -template >, +template , typename Policy = DensePolicy> using Array = DistArray; diff --git a/src/TiledArray/tensor/tensor.cpp b/src/TiledArray/tensor/tensor.cpp index f8400c319b..553f08d708 100644 --- a/src/TiledArray/tensor/tensor.cpp +++ b/src/TiledArray/tensor/tensor.cpp @@ -28,13 +28,11 @@ namespace TiledArray { -template class Tensor >; -template class Tensor >; -template class Tensor >; -template class Tensor >; -// template class Tensor, -// Eigen::aligned_allocator > >; template class -// Tensor, Eigen::aligned_allocator > -// >; +template class Tensor; +template class Tensor; +// template class Tensor; +// template class Tensor; +template class Tensor>; +template class Tensor>; } // namespace TiledArray diff --git a/src/TiledArray/tensor/tensor.h b/src/TiledArray/tensor/tensor.h index 681d535892..afe32a038f 100644 --- a/src/TiledArray/tensor/tensor.h +++ b/src/TiledArray/tensor/tensor.h @@ -2250,15 +2250,12 @@ struct transform> { #ifndef TILEDARRAY_HEADER_ONLY -extern template class Tensor>; -extern template class Tensor>; -extern template class Tensor>; -extern template class Tensor>; -// extern template -// class Tensor, -// Eigen::aligned_allocator > >; extern template class -// Tensor, Eigen::aligned_allocator > -// >; +extern template class Tensor; +extern template class Tensor; +// extern template class Tensor; +// extern template class Tensor; +extern template class Tensor>; +extern template class Tensor>; #endif // TILEDARRAY_HEADER_ONLY diff --git a/src/TiledArray/tensor/type_traits.h b/src/TiledArray/tensor/type_traits.h index 9b39326218..62448336a3 100644 --- a/src/TiledArray/tensor/type_traits.h +++ b/src/TiledArray/tensor/type_traits.h @@ -30,6 +30,7 @@ #include #include +#include namespace Eigen { @@ -42,20 +43,6 @@ class aligned_allocator; namespace TiledArray { // Forward declarations -class Range; -class BlockRange; -template > -class Tensor; -template -class Tile; - -class Permutation; -class BipartitePermutation; - -namespace symmetry { -class Permutation; -} - namespace detail { // Forward declarations