SVectorModule Module

A module for handling compressed vectors.



Contents


Interfaces

public interface AddSparseVectors

  • private subroutine AddSparseVectors_r(inner_index_a, values_a, inner_index_b, values_b, inner_index_c, values_c, total_values_c, alpha_in, threshold_in)

    Add together two sparse vectors. C = A + alpha*B The values that are returned for C are only valid in the range (1:total_values_c). We do not do an automatic shrinking of the array to keep this routine low in overhead.

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), DIMENSION(:):: inner_index_a

    List of indices for A.

    real(kind=NTREAL), intent(in), DIMENSION(:):: values_a

    List of values for A.

    integer, intent(in), DIMENSION(:):: inner_index_b

    List of indices for B.

    real(kind=NTREAL), intent(in), DIMENSION(:):: values_b

    List of values for B.

    integer, intent(out), DIMENSION(:):: inner_index_c

    List of indices for C.

    real(kind=NTREAL), intent(out), DIMENSION(:):: values_c

    List of values computed for C.

    integer, intent(out) :: total_values_c

    The total number of values in C.

    real(kind=NTREAL), intent(in), optional :: alpha_in

    Value to scale VecB by. Optional, default is 1.0.

    real(kind=NTREAL), intent(in), optional :: threshold_in

    for flushing values to zero. Default value is 0.0.

  • private subroutine AddSparseVectors_c(inner_index_a, values_a, inner_index_b, values_b, inner_index_c, values_c, total_values_c, alpha_in, threshold_in)

    Add together two sparse vectors. C = A + alpha*B The values that are returned for C are only valid in the range (1:total_values_c). We do not do an automatic shrinking of the array to keep this routine low in overhead.

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), DIMENSION(:):: inner_index_a

    List of indices for A.

    complex(kind=NTCOMPLEX), intent(in), DIMENSION(:):: values_a

    List of values for A.

    integer, intent(in), DIMENSION(:):: inner_index_b

    List of indices for B.

    complex(kind=NTCOMPLEX), intent(in), DIMENSION(:):: values_b

    List of values for B.

    integer, intent(out), DIMENSION(:):: inner_index_c

    List of indices for C.

    complex(kind=NTCOMPLEX), intent(out), DIMENSION(:):: values_c

    List of values computed for C.

    integer, intent(out) :: total_values_c

    The total number of values in C.

    real(kind=NTREAL), intent(in), optional :: alpha_in

    Value to scale VecB by. Optional, default is 1.0.

    real(kind=NTREAL), intent(in), optional :: threshold_in

    for flushing values to zero. Default value is 0.0.

public interface DotSparseVectors

  • private pure function DotSparseVectors_r(inner_index_a, values_a, inner_index_b, values_b) result(product)

    product = dot(A,B)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), DIMENSION(:):: inner_index_a

    List of indices for A.

    real(kind=NTREAL), intent(in), DIMENSION(:):: values_a

    List of values for A.

    integer, intent(in), DIMENSION(:):: inner_index_b

    List of indices for B.

    real(kind=NTREAL), intent(in), DIMENSION(:):: values_b

    List of values for B.

    Return Value real(kind=NTREAL)

    Dot product.

  • private pure function DotSparseVectors_c(inner_index_a, values_a, inner_index_b, values_b) result(product)

    product = dot(A,B)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), DIMENSION(:):: inner_index_a

    List of indices for A.

    complex(kind=NTCOMPLEX), intent(in), DIMENSION(:):: values_a

    List of values for A.

    integer, intent(in), DIMENSION(:):: inner_index_b

    List of indices for B.

    complex(kind=NTCOMPLEX), intent(in), DIMENSION(:):: values_b

    List of values for B.

    Return Value complex(kind=NTCOMPLEX)

    Dot product.

public interface PairwiseMultiplyVectors

  • private subroutine PairwiseMultiplyVectors_r(inner_index_a, values_a, inner_index_b, values_b, inner_index_c, values_c, total_values_c)

    Pairwise Multiply Vectors C = A Mult B

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), DIMENSION(:):: inner_index_a

    List of indices for A.

    real(kind=NTREAL), intent(in), DIMENSION(:):: values_a

    List of values for A.

    integer, intent(in), DIMENSION(:):: inner_index_b

    List of indices for B.

    real(kind=NTREAL), intent(in), DIMENSION(:):: values_b

    List of values for B.

    integer, intent(out), DIMENSION(:):: inner_index_c

    List of indices computed for C.

    real(kind=NTREAL), intent(out), DIMENSION(:):: values_c

    List of values computed for C.

    integer, intent(out) :: total_values_c

    This is the total number of values in C.

  • private subroutine PairwiseMultiplyVectors_c(inner_index_a, values_a, inner_index_b, values_b, inner_index_c, values_c, total_values_c)

    Pairwise Multiply Vectors C = A Mult B

    Arguments

    Type IntentOptional AttributesName
    integer, intent(in), DIMENSION(:):: inner_index_a

    List of indices for A.

    complex(kind=NTCOMPLEX), intent(in), DIMENSION(:):: values_a

    List of values for A.

    integer, intent(in), DIMENSION(:):: inner_index_b

    List of indices for B.

    complex(kind=NTCOMPLEX), intent(in), DIMENSION(:):: values_b

    List of values for B.

    integer, intent(out), DIMENSION(:):: inner_index_c

    List of indices computed for C.

    complex(kind=NTCOMPLEX), intent(out), DIMENSION(:):: values_c

    This is the total number of values in C.

    integer, intent(out) :: total_values_c

    This is the total number of values in C.