A Module For Performing Distributed Sparse Matrix Algebra Operations.
Compute sigma for the inversion method. See \cite ozaki2001efficient for details.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | this | The matrix to compute the sigma value of. |
||
real(kind=NTREAL), | intent(out) | :: | sigma_value | Sigma |
Multiply two matrices together, and add to the third. C := alphamatAmatB+ beta*matC
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | matA | Matrix A. |
||
type(Matrix_ps), | intent(in) | :: | matB | Matrix B. |
||
type(Matrix_ps), | intent(inout) | :: | matC | matC = alphamatAmatB + beta*matC |
||
real(kind=NTREAL), | intent(in), | optional | :: | alpha_in | Scales the multiplication |
|
real(kind=NTREAL), | intent(in), | optional | :: | beta_in | Scales matrix we sum on to. |
|
real(kind=NTREAL), | intent(in), | optional | :: | threshold_in | For flushing values to zero. |
|
type(MatrixMemoryPool_p), | intent(inout), | optional | :: | memory_pool_in | A memory pool for the calculation. |
Sum up the elements in a matrix into a single value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | this | The matrix to compute. |
||
real(kind=NTREAL), | intent(out) | :: | sum | The sum of all elements. |
Sum up the elements in a matrix into a single value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | this | The matrix to compute. |
||
complex(kind=NTCOMPLEX), | intent(out) | :: | sum | The sum of all elements. |
Elementwise multiplication. C_ij = A_ij * B_ij. Also known as a Hadamard product.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | matA | Matrix A. |
||
type(Matrix_ps), | intent(in) | :: | matB | Matrix B. |
||
type(Matrix_ps), | intent(inout) | :: | matC | matC = MatA mult MatB. |
Compute the norm of a distributed sparse matrix along the rows.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | this | The matrix to compute the norm of. |
The norm value of the full distributed sparse matrix.
product = dot(Matrix A,Matrix B) Note that a dot product is the sum of elementwise multiplication, not traditional matrix multiplication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | matA | Matrix A. |
||
type(Matrix_ps), | intent(in) | :: | matB | Matrix B. |
||
real(kind=NTREAL), | intent(out) | :: | product | The dot product. |
product = dot(Matrix A,Matrix B) Note that a dot product is the sum of elementwise multiplication, not traditional matrix multiplication.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | matA | Matrix A. |
||
type(Matrix_ps), | intent(in) | :: | matB | Matrix B. |
||
complex(kind=NTCOMPLEX), | intent(out) | :: | product | The dot product. |
Matrix B = alpha*Matrix A + Matrix B (AXPY) This will utilize the sparse vector increment routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | matA | Matrix A. |
||
type(Matrix_ps), | intent(inout) | :: | matB | Matrix B. |
||
real(kind=NTREAL), | intent(in), | optional | :: | alpha_in | Multiplier (default= 1.0). |
|
real(kind=NTREAL), | intent(in), | optional | :: | threshold_in | For flushing values to zero (default=0). |
Will scale a distributed sparse matrix by a constant.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(inout) | :: | this | Matrix to scale. |
||
real(kind=NTREAL), | intent(in) | :: | constant | A constant scale factor. |
Will scale a distributed sparse matrix by a constant.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(inout) | :: | this | Matrix to scale. |
||
complex(kind=NTCOMPLEX), | intent(in) | :: | constant | A constant scale factor. |
Compute the trace of the matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Matrix_ps), | intent(in) | :: | this | The matrix to compute the trace of. |
||
real(kind=NTREAL), | intent(out) | :: | trace_value | The trace value of the full distributed sparse matrix. |