mptensor v0.5.1
Parallel Library for Tensor Network Methods
Loading...
Searching...
No Matches
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 _INTERFACE_DOC_HPP_
29#define _INTERFACE_DOC_HPP_
30
31namespace mptensor {
32
34
38inline namespace matrix {
39
41
45namespace interface {
46
48
58template <typename C>
59class Matrix;
60
62
65template <typename C>
66Matrix<C>::Matrix<C>();
67
69
72template <typename C>
73explicit Matrix<C>::Matrix<C>(const comm_type& comm);
74
76
81template <typename C>
82Matrix<C>::Matrix<C>(size_t n_row, size_t n_col);
83
85
90template <typename C>
91Matrix<C>::Matrix<C>(const comm_type& comm, size_t n_row, size_t n_col);
92
94
97template <typename C>
98const C& Matrix<C>::operator[](size_t i) const;
99
101
104template <typename C>
105C& Matrix<C>::operator[](size_t i);
106
108
111template <typename C>
112size_t Matrix<C>::local_size() const;
113
115
118template <typename C>
119const typename Matrix<C>::comm_type& Matrix<C>::get_comm() const;
120
122
125template <typename C>
126int Matrix<C>::get_comm_size() const;
127
129
132template <typename C>
133int Matrix<C>::get_comm_rank() const;
134
136
139template <typename C>
140std::vector<C> Matrix<C>::flatten();
141
143template <typename C>
144void Matrix<C>::barrier() const;
145
147
150template <typename C>
152
154
159template <typename C>
160template <typename D>
161void Matrix<C>::bcast(D* buffer, int count, int root) const;
162
164template <typename C>
166
168template <typename C>
170
172
179template <typename C>
180int matrix_eigh(Matrix<C>& a, std::vector<double>& s);
181
183
190template <typename C>
192
194
199template <typename C>
200double max(const Matrix<C>& a);
201
203
208template <typename C>
209double min(const Matrix<C>& a);
210
212
216template <typename C>
217double max_abs(const Matrix<C>& a);
218
220
224template <typename C>
225double min_abs(const Matrix<C>& a);
226
227} // namespace interface
228} // inline namespace matrix
229} // namespace mptensor
230
231#endif // _INTERFACE_DOC_HPP_
const comm_type & get_comm() const
Return the MPI communicator.
int get_comm_rank() const
Return the MPI rank.
std::vector< C > flatten()
Return the flattened vector.
void prep_local_to_global() const
Preprocess for fast conversion from local index to global one.
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 get_comm_size() const
Return the size of the MPI communicator.
size_t local_size() const
Return the number of elements in this process.
void barrier() const
Wrapper of MPI_Barrier.
int comm_type
Set MPI_Comm for MPI program.
Definition interface.hpp:44
void bcast(D *buffer, int count, int root) const
Wrapper of MPI_Bcast.
mptensor::complex complex
Definition matrix_lapack.cc:36
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 .
int matrix_eigh(Matrix< C > &a, std::vector< double > &s, Matrix< C > &u)
double min(const Matrix< C > &a)
Return the minimum element.
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.
Definition complex.hpp:34