NTPoly
|
A module for wrapping a Distributed Sparse Matrix. More...
Data Types | |
type | distributedsparsematrix_wrp |
A wrapper for the sparse matrix data type. More... | |
Functions/Subroutines | |
pure subroutine, public | constructemptydistributedsparsematrix_wrp (ih_this, matrix_dim) |
Wrap the constructor of an empty sparse, distributed, matrix. More... | |
subroutine, public | constructfrommatrixmarket_wrp (ih_this, file_name, name_size) |
Construct distributed sparse matrix from a matrix market file in parallel. More... | |
subroutine, public | constructfrombinary_wrp (ih_this, file_name, name_size) |
Construct a distributed sparse matrix from a binary file in parallel. More... | |
pure subroutine, public | copydistributedsparsematrix_wrp (ih_matA, ih_matB) |
Copy a distributed sparse matrix in a safe way. More... | |
pure subroutine, public | destructdistributedsparsematrix_wrp (ih_this) |
Destruct a distributed sparse matrix. More... | |
subroutine, public | writetobinary_wrp (ih_this, file_name, name_size) |
Save a distributed sparse matrix to a file. More... | |
subroutine, public | writetomatrixmarket_wrp (ih_this, file_name, name_size) |
Save a distributed sparse matrix to a matrix market file. More... | |
subroutine, public | fillfromtripletlist_wrp (ih_this, ih_triplet_list) |
This routine fills in a matrix based on local triplet lists. More... | |
pure subroutine, public | filldistributedidentity_wrp (ih_this) |
Fill in the values of a distributed matrix with the identity matrix. More... | |
subroutine, public | filldistributedpermutation_wrp (ih_this, ih_permutation, permute_rows) |
Fill in the values of a distributed matrix with a permutation matrix. More... | |
pure subroutine, public | getactualdimension_wrp (ih_this, mat_dimension) |
Wrap the Actual Dimension accessor. More... | |
pure subroutine, public | getlogicaldimension_wrp (ih_this, mat_dimension) |
Wrap the Logical Dimension accessor. More... | |
pure subroutine, public | gettripletlist_wrp (ih_this, ih_triplet_list) |
Extracts a triplet list of the data that is stored on this process. More... | |
subroutine, public | incrementdistributedsparsematrix_wrp (ih_matA, ih_matB, alpha_in, threshold_in) |
Matrix B = alpha*Matrix A + Matrix B (AXPY) More... | |
real(ntreal) function, public | dotdistributedsparsematrix_wrp (ih_matA, ih_matB) |
product = dot(matA,matB) More... | |
subroutine, public | distributedpairwisemultiply_wrp (ih_matA, ih_matB, ih_matC) |
Pairwise multiply two matrices together. More... | |
subroutine, public | distributedgemm_wrp (ih_matA, ih_matB, ih_matC, alpha_in, beta_in, threshold_in, ih_memory_pool_in) |
Multiply two matrices together, and add to the third. More... | |
pure subroutine, public | scaledistributedsparsematrix_wrp (ih_this, constant) |
Will scale a distributed sparse matrix by a constant. More... | |
real(ntreal) function, public | distributedsparsenorm_wrp (ih_this) |
Compute the norm of a distributed sparse matrix along the rows. More... | |
real(ntreal) function, public | trace_wrp (ih_this) |
Compute the trace of the matrix. More... | |
A module for wrapping a Distributed Sparse Matrix.
pure subroutine, public distributedsparsematrixmodule_wrp::constructemptydistributedsparsematrix_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this, |
integer(kind=c_int), intent(in) | matrix_dim | ||
) |
Wrap the constructor of an empty sparse, distributed, matrix.
[in,out] | ih_this | the matrix to be constructed. |
[in] | matrix_dim | the dimension of the full matrix. |
subroutine, public distributedsparsematrixmodule_wrp::constructfrombinary_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this, |
character(kind=c_char), dimension(name_size), intent(in) | file_name, | ||
integer(kind=c_int), intent(in) | name_size | ||
) |
Construct a distributed sparse matrix from a binary file in parallel.
[out] | ih_this | the file being constructed. |
[in] | file_name | name of the file to read. |
[in] | name_size | the number of characters in the file name. |
subroutine, public distributedsparsematrixmodule_wrp::constructfrommatrixmarket_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this, |
character(kind=c_char), dimension(name_size), intent(in) | file_name, | ||
integer(kind=c_int), intent(in) | name_size | ||
) |
Construct distributed sparse matrix from a matrix market file in parallel.
[out] | ih_this | the file being constructed. |
[in] | file_name | name of the file to read. |
[in] | name_size | the number of characters in the file name. |
pure subroutine, public distributedsparsematrixmodule_wrp::copydistributedsparsematrix_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matA, |
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_matB | ||
) |
Copy a distributed sparse matrix in a safe way.
[in] | ih_matA | matrix to copy |
[in,out] | ih_matB | = matA |
pure subroutine, public distributedsparsematrixmodule_wrp::destructdistributedsparsematrix_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this | ) |
Destruct a distributed sparse matrix.
[in,out] | ih_this | the matrix to destruct |
subroutine, public distributedsparsematrixmodule_wrp::distributedgemm_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matA, |
integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matB, | ||
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_matC, | ||
real(ntreal), intent(in) | alpha_in, | ||
real(ntreal), intent(in) | beta_in, | ||
real(ntreal), intent(in) | threshold_in, | ||
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_memory_pool_in | ||
) |
Multiply two matrices together, and add to the third.
[in] | ih_matA | Matrix A |
[in] | ih_matB | Matrix B |
[out] | ih_matC | = alpha*matA*matB + beta*matC |
[in] | alpha_in | scales the multiplication |
[in] | beta_in | scales matrix we sum on to |
[in] | threshold_in | for flushing values to zero. |
[in,out] | ih_memory_pool_in | a memory pool that can be used for the calculation. |
subroutine, public distributedsparsematrixmodule_wrp::distributedpairwisemultiply_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matA, |
integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matB, | ||
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_matC | ||
) |
Pairwise multiply two matrices together.
[in] | ih_matA | Matrix A |
[in] | ih_matB | Matrix B |
[out] | ih_matC | = matA*matB |
real(ntreal) function, public distributedsparsematrixmodule_wrp::distributedsparsenorm_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this | ) |
Compute the norm of a distributed sparse matrix along the rows.
[in] | ih_this | the matrix to compute the norm of. |
real(ntreal) function, public distributedsparsematrixmodule_wrp::dotdistributedsparsematrix_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matA, |
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_matB | ||
) |
product = dot(matA,matB)
[in] | ih_matA | Matrix A |
[in] | ih_matB | Matrix B |
pure subroutine, public distributedsparsematrixmodule_wrp::filldistributedidentity_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this | ) |
Fill in the values of a distributed matrix with the identity matrix.
[in,out] | ih_this | the matrix being filled. |
subroutine, public distributedsparsematrixmodule_wrp::filldistributedpermutation_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this, |
integer(kind=c_int), dimension(size_wrp), intent(in) | ih_permutation, | ||
logical(kind=c_bool), intent(in) | permute_rows | ||
) |
Fill in the values of a distributed matrix with a permutation matrix.
[in,out] | ih_this | the matrix being filled. |
[in] | ih_permutation | the perumutation to fill with. |
[in] | permute_rows | whether to permute rows or columns. |
subroutine, public distributedsparsematrixmodule_wrp::fillfromtripletlist_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this, |
integer(kind=c_int), dimension(size_wrp), intent(in) | ih_triplet_list | ||
) |
This routine fills in a matrix based on local triplet lists.
[in,out] | ih_this | the matrix being filled. |
[in] | ih_triplet_list | the triplet list of values. |
pure subroutine, public distributedsparsematrixmodule_wrp::getactualdimension_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this, |
integer(kind=c_int), intent(out) | mat_dimension | ||
) |
Wrap the Actual Dimension accessor.
[in] | ih_this | handle to the matrix. |
[out] | mat_dimension | the size of the matrix. |
pure subroutine, public distributedsparsematrixmodule_wrp::getlogicaldimension_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this, |
integer(kind=c_int), intent(out) | mat_dimension | ||
) |
Wrap the Logical Dimension accessor.
[in] | ih_this | handle to the matrix. |
[out] | mat_dimension | the size of the matrix. |
pure subroutine, public distributedsparsematrixmodule_wrp::gettripletlist_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this, |
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_triplet_list | ||
) |
Extracts a triplet list of the data that is stored on this process.
[in] | ih_this | the distributed sparse matrix. |
[in,out] | ih_triplet_list | the list to fill. |
subroutine, public distributedsparsematrixmodule_wrp::incrementdistributedsparsematrix_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_matA, |
integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_matB, | ||
real(ntreal), intent(in) | alpha_in, | ||
real(ntreal), intent(in) | threshold_in | ||
) |
Matrix B = alpha*Matrix A + Matrix B (AXPY)
[in] | ih_matA | Matrix A |
[in,out] | ih_matB | Matrix B |
[in] | alpha_in | multiplier. |
[in] | threshold_in | for flushing values to zero. |
pure subroutine, public distributedsparsematrixmodule_wrp::scaledistributedsparsematrix_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(inout) | ih_this, |
real(ntreal), intent(in) | constant | ||
) |
Will scale a distributed sparse matrix by a constant.
[in,out] | ih_this | Matrix to scale. |
[in] | constant | scale factor. |
real(ntreal) function, public distributedsparsematrixmodule_wrp::trace_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this | ) |
Compute the trace of the matrix.
[in] | ih_this | the matrix to compute the norm of. |
subroutine, public distributedsparsematrixmodule_wrp::writetobinary_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this, |
character(kind=c_char), dimension(name_size), intent(in) | file_name, | ||
integer(kind=c_int), intent(in) | name_size | ||
) |
Save a distributed sparse matrix to a file.
[in] | ih_this | the Matrix to write. |
[in] | file_name | name of the file to write to. |
[in] | name_size | the number of characters in the file name. |
subroutine, public distributedsparsematrixmodule_wrp::writetomatrixmarket_wrp | ( | integer(kind=c_int), dimension(size_wrp), intent(in) | ih_this, |
character(kind=c_char), dimension(name_size), intent(in) | file_name, | ||
integer(kind=c_int), intent(in) | name_size | ||
) |
Save a distributed sparse matrix to a matrix market file.
[in] | ih_this | the Matrix to write. |
[in] | file_name | name of the file to write to. |
[in] | name_size | the number of characters in the file name. |