NTPoly
|
A module for performing linear algebra using sparse matrices. More...
Functions/Subroutines | |
pure subroutine, public | scalesparsematrix (matA, constant) |
Will scale a sparse matrix by a constant. More... | |
pure subroutine, public | incrementsparsematrix (matA, matB, alpha_in, threshold_in) |
Matrix B = alpha*Matrix A + Matrix B (AXPY). This will utilize the sparse vector addition routine. More... | |
pure subroutine, public | pairwisemultiplysparsematrix (matA, matB, matC) |
Pairwise Multiply two matrices. This will utilize the sparse vector pairwise routine. More... | |
pure real(ntreal) function, public | dotsparsematrix (matA, matB) |
Product = sum(MatA[ij]*MatB[ij]) More... | |
subroutine, public | gemm (matA, matB, matC, IsATransposed_in, IsBTransposed_in, alpha_in, beta_in, threshold_in, blocked_memory_pool_in) |
Multiply two matrices together, and add to the third. C := alpha*matA*op( matB ) + beta*matC. More... | |
pure subroutine, public | sparsematrixnorm (this, norm_per_column) |
Compute the norm of a sparse matrix along the columns. More... | |
pure real(ntreal) function, public | sparsematrixgrandsum (this) |
Sum the elements of a matrix. More... | |
A module for performing linear algebra using sparse matrices.
pure real(ntreal) function, public sparsematrixalgebramodule::dotsparsematrix | ( | type(sparsematrix_t), intent(in) | matA, |
type(sparsematrix_t), intent(in) | matB | ||
) |
Product = sum(MatA[ij]*MatB[ij])
[in] | matA | Matrix A. |
[in] | matB | Matrix B. |
subroutine, public sparsematrixalgebramodule::gemm | ( | type(sparsematrix_t), intent(in) | matA, |
type(sparsematrix_t), intent(in) | matB, | ||
type(sparsematrix_t), intent(inout) | matC, | ||
logical, intent(in), optional | IsATransposed_in, | ||
logical, intent(in), optional | IsBTransposed_in, | ||
real(ntreal), intent(in), optional | alpha_in, | ||
real(ntreal), intent(in), optional | beta_in, | ||
real(ntreal), intent(in), optional | threshold_in, | ||
type(matrixmemorypool_t), intent(inout), optional, target | blocked_memory_pool_in | ||
) |
Multiply two matrices together, and add to the third. C := alpha*matA*op( matB ) + beta*matC.
[in] | matA | Matrix A. |
[in] | matB | Matrix B. |
[out] | matC | = alpha*matA*op( matB ) + beta*matC. |
[in] | IsATransposed_in | true if A is already transposed. |
[in] | IsBTransposed_in | true if B is already transposed. |
[in] | alpha_in | scales the multiplication. |
[in] | beta_in | scales matrix we sum on to. |
[in] | threshold_in | for flushing values to zero. Default value is 0.0. |
[in,out] | blocked_memory_pool_in | an optional memory pool for doing the calculation. |
pure subroutine, public sparsematrixalgebramodule::incrementsparsematrix | ( | type(sparsematrix_t), intent(in) | matA, |
type(sparsematrix_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 addition routine.
[in] | matA | Matrix A. |
[in,out] | matB | Matrix B. |
[in] | alpha_in | multiplier (optional, default=1.0) |
[in] | threshold_in | for flushing values to zero. (Optional, default=0). |
pure subroutine, public sparsematrixalgebramodule::pairwisemultiplysparsematrix | ( | type(sparsematrix_t), intent(in) | matA, |
type(sparsematrix_t), intent(in) | matB, | ||
type(sparsematrix_t), intent(inout) | matC | ||
) |
Pairwise Multiply two matrices. This will utilize the sparse vector pairwise routine.
[in] | matA | Matrix A. |
[in] | matB | Matrix B. |
[in,out] | matC | = MatA mult MatB. |
pure subroutine, public sparsematrixalgebramodule::scalesparsematrix | ( | type(sparsematrix_t), intent(inout) | matA, |
real(ntreal), intent(in) | constant | ||
) |
Will scale a sparse matrix by a constant.
[in,out] | matA | Matrix A. |
[in] | constant | scale factor. |
pure real(ntreal) function, public sparsematrixalgebramodule::sparsematrixgrandsum | ( | type(sparsematrix_t), intent(in) | this | ) |
Sum the elements of a matrix.
[in] | this | the matrix to sum |
pure subroutine, public sparsematrixalgebramodule::sparsematrixnorm | ( | type(sparsematrix_t), intent(in) | this, |
real(ntreal), dimension(:), intent(out), allocatable | norm_per_column | ||
) |
Compute the norm of a sparse matrix along the columns.
[in] | this | the matrix to compute the norm of. |
[out] | norm_per_column | the norm value for each column in this matrix. |