24 #ifndef TILEDARRAY_MATH_LINALG_NON_DISTRIBUTED_HEIG_H__INCLUDED
25 #define TILEDARRAY_MATH_LINALG_NON_DISTRIBUTED_HEIG_H__INCLUDED
27 #include <TiledArray/config.h>
53 template <
typename Array>
56 World& world = A.
world();
58 std::vector<numeric_type> evals;
59 if (world.rank() == 0) {
62 world.gop.broadcast_serializable(A_eig, 0);
63 world.gop.broadcast_serializable(evals, 0);
64 if (evec_trange.rank() == 0) evec_trange = A.
trange();
67 eigen_to_array<Array>(world, evec_trange, A_eig)
94 template <
typename ArrayA,
typename ArrayB,
typename EVecType = ArrayA>
98 World& world = A.world();
101 std::vector<numeric_type> evals;
102 if (world.rank() == 0) {
105 world.gop.broadcast_serializable(A_eig, 0);
106 world.gop.broadcast_serializable(evals, 0);
107 if (evec_trange.rank() == 0) evec_trange = A.trange();
110 eigen_to_array<ArrayA>(A.world(), evec_trange, A_eig)
116 #endif // TILEDARRAY_MATH_LINALG_NON_DISTRIBUTED_HEIG_H__INCLUDED