STD.BLAS.dasum( m, x, incx, skipped);
m | Number of entries |
x | The column major matrix holding the vector |
incxx | The increment for x, 1 in the case of an actual vector |
skipped | The number of entries stepped over. Default is zero. |
Return: | The sum of the absolute values |
The dasum function gets the absolute sum, the 1 norm of a vector.
Example:
IMPORT STD; STD.BLAS.Types.matrix_t test_data := [2, -2, -3, 3, 1, 3, -1, -1, 1]; STD.BLAS.dasum(9, test_data, 1); //sums the absolute values of the matrix, and returns 17