mptensor v0.4.0
Parallel Library for Tensor Network Methods
Loading...
Searching...
No Matches
matrix_interface_doc.hpp
Go to the documentation of this file.
1/*
2 mptensor - Parallel Library for Tensor Network Methods
3
4 Copyright 2016 Satoshi Morita
5
6 mptensor is free software: you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version.
10
11 mptensor is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with mptensor. If not, see
18 <https://www.gnu.org/licenses/>.
19*/
20
28#ifndef _MATRIX_INTERFACE_DOC_HPP_
29#define _MATRIX_INTERFACE_DOC_HPP_
30
31namespace mptensor {
32
34
38namespace matrix_interface {
39
41
51template <typename C>
52class Matrix;
53
55
58template <typename C>
59Matrix<C>::Matrix<C>();
60
62
65template <typename C>
66explicit Matrix<C>::Matrix<C>(const comm_type& comm);
67
69
74template <typename C>
75Matrix<C>::Matrix<C>(size_t n_row, size_t n_col);
76
78
83template <typename C>
84Matrix<C>::Matrix<C>(const comm_type& comm, size_t n_row, size_t n_col);
85
87
90template <typename C>
91const C& Matrix<C>::operator[](size_t i) const;
92
94
97template <typename C>
99
101
104template <typename C>
105size_t Matrix<C>::local_size() const;
106
108
111template <typename C>
112const typename Matrix<C>::comm_type& Matrix<C>::get_comm() const;
113
115
118template <typename C>
119int Matrix<C>::get_comm_size() const;
120
122
125template <typename C>
126int Matrix<C>::get_comm_rank() const;
127
129
132template <typename C>
133std::vector<C> Matrix<C>::flatten();
134
136template <typename C>
137void Matrix<C>::barrier() const;
138
140
143template <typename C>
145
147
152template <typename C>
153template <typename D>
154void Matrix<C>::bcast(D* buffer, int count, int root) const;
155
157template <typename C>
159
161template <typename C>
163
165
172template <typename C>
173int matrix_eigh(Matrix<C>& a, std::vector<double>& s);
174
176
183template <typename C>
185
187
192template <typename C>
193double max(const Matrix<C>& a);
194
196
201template <typename C>
202double min(const Matrix<C>& a);
203
205
209template <typename C>
210double max_abs(const Matrix<C>& a);
211
213
217template <typename C>
218double min_abs(const Matrix<C>& a);
219
220} // namespace matrix_interface
221} // namespace mptensor
222
223#endif // _MATRIX_INTERFACE_DOC_HPP_
std::vector< C > flatten()
Return the flattened vector.
size_t local_size() const
Return the number of elements in this process.
C allreduce_sum(C value) const
Return the summation of a scalar. Every processes returns the same value.
void prep_global_to_local() const
Preprocess for fast conversion from local index to global one.
const C & operator[](size_t i) const
Const array subscript operator.
int comm_type
Set MPI_Comm for MPI programm.
Definition matrix_interface.hpp:41
void prep_local_to_global() const
Preprocess for fast conversion from local index to global one.
void bcast(D *buffer, int count, int root) const
Wrapper of MPI_Bcast.
int get_comm_size() const
Return the size of the MPI communicator.
const comm_type & get_comm() const
Return the MPI communicator.
int get_comm_rank() const
Return the MPI rank.
void barrier() const
Wrapper of MPI_Barrier.
mptensor::complex complex
Definition matrix_lapack.cc:36
double min(const Matrix< C > &a)
Return the minimum element.
int matrix_eigh(Matrix< C > &a, std::vector< double > &s, Matrix< C > &u)
double max_abs(const Matrix< C > &a)
Return the maximum of the absolute value of elements.
double max(const Matrix< C > &a)
Return the maximum element.
double min_abs(const Matrix< C > &a)
Return the minimum of the absolute value of elements.
int matrix_solve(Matrix< C > &a, Matrix< C > &b)
Solve linear equation .
Definition complex.hpp:34