templated norm computation
templatized updates