A module for handling compressed vectors. Compressed vectors are stored in two lists. The first is a list of indices, the second a list of values.
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
product = dot(A,B)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Dot product.
product = dot(A,B)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Dot product.
Pairwise Multiply Vectors C = A Mult B
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |
Pairwise Multiply Vectors C = A Mult B
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |