45 typename ElementReduction
49 ElementReduction accumulator) {
53 [&](
typename Layout::TensorCoord
const & coord) {
54 Element element = Element(view.
at(coord));
67 return TensorNorm<Element, Layout, double>(view, 0);
Definition: aligned_buffer.h:35
ElementReduction TensorNorm(TensorView< Element, Layout > view, ElementReduction accumulator)
Computes the p=2 norm of the elements of a tensor with arbitrary reduction data type.
Definition: tensor_norm.h:47
Defines a structure containing strides, bounds, and a pointer to tensor data.
CUTLASS_HOST_DEVICE TensorCoord const & extent() const
Returns the extent of the view (the size along each logical dimension).
Definition: tensor_view.h:167
CUTLASS_HOST_DEVICE R norm_accumulate(T const &x, R const &accumulator)
Norm-accumulate calculation.
Definition: complex.h:343
void TensorForEachLambda(Coord< Rank > extent, Func func)
Iterates over the index space of a tensor and calls a C++ lambda.
Definition: host/tensor_foreach.h:98
CUTLASS_HOST_DEVICE Reference at(TensorCoord const &coord) const
Returns a reference to the element at a given Coord.
Definition: tensor_ref.h:307
Basic include for CUTLASS.
CUTLASS_HOST_DEVICE complex< T > sqrt(complex< T > const &z)
Computes the square root of complex number z.
Definition: complex.h:393