NTPoly
Functions/Subroutines
distributedsparsematrixalgebramodule Module Reference

A Module For Performing Distributed Sparse Matrix Algebra Operations. More...

Functions/Subroutines

subroutine, public computesigma (this, sigma_value)
 Compute sigma for the inversion method. See [9] for details. More...
 
subroutine, public distributedgemm (matA, matB, matC, alpha_in, beta_in, threshold_in, memory_pool_in)
 Multiply two matrices together, and add to the third. C := alpha*matA*matB+ beta*matC. More...
 
real(ntreal) function, public distributedgrandsum (matA)
 Sum up the elements in a matrix into a single value. More...
 
subroutine, public distributedpairwisemultiply (matA, matB, matC)
 Elementwise multiplication. C_ij = A_ij * B_ij. Also known as a Hadamard product. More...
 
real(ntreal) function, public distributedsparsenorm (this)
 Compute the norm of a distributed sparse matrix along the rows. More...
 
real(ntreal) function, public dotdistributedsparsematrix (matA, matB)
 product = dot(Matrix A,Matrix B) Note that a dot product is the sum of elementwise multiplication, not traditional matrix multiplication. More...
 
subroutine, public incrementdistributedsparsematrix (matA, matB, alpha_in, threshold_in)
 Matrix B = alpha*Matrix A + Matrix B (AXPY) This will utilize the sparse vector increment routine. More...
 
subroutine, public scaledistributedsparsematrix (this, constant)
 Will scale a distributed sparse matrix by a constant. More...
 
real(ntreal) function, public trace (this)
 Compute the trace of the matrix. More...
 

Detailed Description

A Module For Performing Distributed Sparse Matrix Algebra Operations.

Function/Subroutine Documentation

◆ computesigma()

subroutine, public distributedsparsematrixalgebramodule::computesigma ( type(distributedsparsematrix_t), intent(in)  this,
real(ntreal), intent(out)  sigma_value 
)

Compute sigma for the inversion method. See [9] for details.

Parameters
[in]thisthe matrix to compute the sigma value of.
[out]sigma_valuesigma.

◆ distributedgemm()

subroutine, public distributedsparsematrixalgebramodule::distributedgemm ( type(distributedsparsematrix_t), intent(in)  matA,
type(distributedsparsematrix_t), intent(in)  matB,
type(distributedsparsematrix_t), intent(inout)  matC,
real(ntreal), intent(in), optional  alpha_in,
real(ntreal), intent(in), optional  beta_in,
real(ntreal), intent(in), optional  threshold_in,
type(distributedmatrixmemorypool_t), intent(inout), optional  memory_pool_in 
)

Multiply two matrices together, and add to the third. C := alpha*matA*matB+ beta*matC.

Parameters
[in]matAMatrix A
[in]matBMatrix B
[out]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 (Optional, default=0).
[in,out]memory_pool_ina memory pool for the calculation (Optional).

◆ distributedgrandsum()

real(ntreal) function, public distributedsparsematrixalgebramodule::distributedgrandsum ( type(distributedsparsematrix_t), intent(in)  matA)

Sum up the elements in a matrix into a single value.

Parameters
[in]matAMatrix A.
Returns
sum the sum of all elements.

◆ distributedpairwisemultiply()

subroutine, public distributedsparsematrixalgebramodule::distributedpairwisemultiply ( type(distributedsparsematrix_t), intent(in)  matA,
type(distributedsparsematrix_t), intent(in)  matB,
type(distributedsparsematrix_t), intent(inout)  matC 
)

Elementwise multiplication. C_ij = A_ij * B_ij. Also known as a Hadamard product.

Parameters
[in]matAMatrix A.
[in]matBMatrix B.
[in,out]matC= MatA mult MatB.

◆ distributedsparsenorm()

real(ntreal) function, public distributedsparsematrixalgebramodule::distributedsparsenorm ( type(distributedsparsematrix_t), intent(in)  this)

Compute the norm of a distributed sparse matrix along the rows.

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

◆ dotdistributedsparsematrix()

real(ntreal) function, public distributedsparsematrixalgebramodule::dotdistributedsparsematrix ( type(distributedsparsematrix_t), intent(in)  matA,
type(distributedsparsematrix_t), intent(in)  matB 
)

product = dot(Matrix A,Matrix B) Note that a dot product is the sum of elementwise multiplication, not traditional matrix multiplication.

Parameters
[in]matAMatrix A.
[in,out]matBMatrix B.
Returns
product the dot product.

◆ incrementdistributedsparsematrix()

subroutine, public distributedsparsematrixalgebramodule::incrementdistributedsparsematrix ( type(distributedsparsematrix_t), intent(in)  matA,
type(distributedsparsematrix_t), intent(inout)  matB,
real(ntreal), intent(in), optional  alpha_in,
real(ntreal), intent(in), optional  threshold_in 
)

Matrix B = alpha*Matrix A + Matrix B (AXPY) This will utilize the sparse vector increment routine.

Parameters
[in]matAMatrix A.
[in,out]matBMatrix B.
[in]alpha_inmultiplier. (Optional, default= 1.0)
[in]threshold_infor flushing values to zero. (Optional, default=0)

◆ scaledistributedsparsematrix()

subroutine, public distributedsparsematrixalgebramodule::scaledistributedsparsematrix ( type(distributedsparsematrix_t), intent(inout)  this,
real(ntreal), intent(in)  constant 
)

Will scale a distributed sparse matrix by a constant.

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

◆ trace()

real(ntreal) function, public distributedsparsematrixalgebramodule::trace ( type(distributedsparsematrix_t), intent(in)  this)

Compute the trace of the matrix.

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