NTPoly
Data Types | Functions/Subroutines
distributedsparsematrixmodule_wrp Module Reference

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...
 

Detailed Description

A module for wrapping a Distributed Sparse Matrix.

Function/Subroutine Documentation

◆ constructemptydistributedsparsematrix_wrp()

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.

Parameters
[in,out]ih_thisthe matrix to be constructed.
[in]matrix_dimthe dimension of the full matrix.

◆ constructfrombinary_wrp()

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.

Parameters
[out]ih_thisthe file being constructed.
[in]file_namename of the file to read.
[in]name_sizethe number of characters in the file name.

◆ constructfrommatrixmarket_wrp()

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.

Parameters
[out]ih_thisthe file being constructed.
[in]file_namename of the file to read.
[in]name_sizethe number of characters in the file name.

◆ copydistributedsparsematrix_wrp()

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.

Parameters
[in]ih_matAmatrix to copy
[in,out]ih_matB= matA

◆ destructdistributedsparsematrix_wrp()

pure subroutine, public distributedsparsematrixmodule_wrp::destructdistributedsparsematrix_wrp ( integer(kind=c_int), dimension(size_wrp), intent(inout)  ih_this)

Destruct a distributed sparse matrix.

Parameters
[in,out]ih_thisthe matrix to destruct

◆ distributedgemm_wrp()

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.

Parameters
[in]ih_matAMatrix A
[in]ih_matBMatrix B
[out]ih_matC= alpha*matA*matB + beta*matC
[in]alpha_inscales the multiplication
[in]beta_inscales matrix we sum on to
[in]threshold_infor flushing values to zero.
[in,out]ih_memory_pool_ina memory pool that can be used for the calculation.

◆ distributedpairwisemultiply_wrp()

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.

Parameters
[in]ih_matAMatrix A
[in]ih_matBMatrix B
[out]ih_matC= matA*matB

◆ distributedsparsenorm_wrp()

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.

Parameters
[in]ih_thisthe matrix to compute the norm of.
Returns
the norm value of the full distributed sparse matrix.

◆ dotdistributedsparsematrix_wrp()

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)

Parameters
[in]ih_matAMatrix A
[in]ih_matBMatrix B
Returns
product dot product of the two matrices

◆ filldistributedidentity_wrp()

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.

Parameters
[in,out]ih_thisthe matrix being filled.

◆ filldistributedpermutation_wrp()

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.

Parameters
[in,out]ih_thisthe matrix being filled.
[in]ih_permutationthe perumutation to fill with.
[in]permute_rowswhether to permute rows or columns.

◆ fillfromtripletlist_wrp()

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.

Parameters
[in,out]ih_thisthe matrix being filled.
[in]ih_triplet_listthe triplet list of values.

◆ getactualdimension_wrp()

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.

Parameters
[in]ih_thishandle to the matrix.
[out]mat_dimensionthe size of the matrix.

◆ getlogicaldimension_wrp()

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.

Parameters
[in]ih_thishandle to the matrix.
[out]mat_dimensionthe size of the matrix.

◆ gettripletlist_wrp()

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.

Parameters
[in]ih_thisthe distributed sparse matrix.
[in,out]ih_triplet_listthe list to fill.

◆ incrementdistributedsparsematrix_wrp()

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)

Parameters
[in]ih_matAMatrix A
[in,out]ih_matBMatrix B
[in]alpha_inmultiplier.
[in]threshold_infor flushing values to zero.

◆ scaledistributedsparsematrix_wrp()

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.

Parameters
[in,out]ih_thisMatrix to scale.
[in]constantscale factor.

◆ trace_wrp()

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.

Parameters
[in]ih_thisthe matrix to compute the norm of.
Returns
the trace value of the full distributed sparse matrix.

◆ writetobinary_wrp()

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.

Parameters
[in]ih_thisthe Matrix to write.
[in]file_namename of the file to write to.
[in]name_sizethe number of characters in the file name.

◆ writetomatrixmarket_wrp()

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.

Parameters
[in]ih_thisthe Matrix to write.
[in]file_namename of the file to write to.
[in]name_sizethe number of characters in the file name.