The standard p-norm can be implemented with the help of the CUDA sum and abs ufuncs, but this involves a copy. We need a C++ implementation if we want efficiency.
For p=inf I currently don't see a way of implementing in Python. We can include that case in the same function in C++, too, but while we're at it, the max() and min() functions would be good to have.
The standard p-norm can be implemented with the help of the CUDA
sum
andabs
ufuncs, but this involves a copy. We need a C++ implementation if we want efficiency.For
p=inf
I currently don't see a way of implementing in Python. We can include that case in the same function in C++, too, but while we're at it, themax()
andmin()
functions would be good to have.