Difference between revisions of "Cheap norm.m"
(Created page with "{{DISPLAYTITLE:cheap_norm.m}} __NOTOC__ The cheapest possible norm for various representations of matrices. CUDA stores matrices by rows, Matlab by columns, and polyadic objec...") |
(Normalise sequential blank lines) |
||
| Line 21: | Line 21: | ||
==See also== | ==See also== | ||
[[clean_up.m]], [[frob_chop.m]], [[hdot.m]], [[mprealloc.m]] | [[clean_up.m]], [[frob_chop.m]], [[hdot.m]], [[mprealloc.m]] | ||
| − | |||
''Version 2.3, authors: [[Ilya Kuprov]]'' | ''Version 2.3, authors: [[Ilya Kuprov]]'' | ||
Revision as of 11:23, 25 April 2026
The cheapest possible norm for various representations of matrices. CUDA stores matrices by rows, Matlab by columns, and polyadic objects can only multiply vectors, in which case Algorithm 2.1 from Hager's paper (https://doi.org/10.1137/S0895479899356080) is used with Higham's extension to the complex case.
Syntax
n=cheap_norm(A)
Arguments
A - a matrix, or a polyadic representation thereof
Outputs
n - infinity-norm for GPU arrays, 1-norm for CPU arrays,
and Hager's upper bound on 1-norm for polyadics
Notes
- Some norms are vastly more expensive than others, this function uses the cheapest ones available.
- In very rare cases, Hager's algorithm stagnates. If this happens, drop us a note and we will implement Higham's more recent work.
See also
clean_up.m, frob_chop.m, hdot.m, mprealloc.m
Version 2.3, authors: Ilya Kuprov