-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a dispatch for LinearAlgebra.norm2
`norm(@view x[..], 2)` was previously leading to a call of `LinearAlgebra.generic_norm2` which led to a scalar indexing. This catches such cuda subarray norm2 calls earlier. Inf-norm and p-norm with cuda subarrays still leads to the following dispatches: ```julia LinearAlgebra.generic_normInf(x) = float(mapreduce(norm, max, x)) LinearAlgebra.generic_norm1(x) = mapreduce(float ∘ norm, +, x) ``` I am not sure if there is a better way to dispatch them.
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters