MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / cpu_norm_inf

Function cpu_norm_inf

test/norm.cpp:123–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123double cpu_norm_inf(af::array &value) {
124 double norm_inf;
125 af::dim4 dims = value.dims();
126 if (value.type() == c32 || value.type() == c64) {
127 vector<complex<double> > values(value.elements());
128 value.as(c64).host(values.data());
129 norm_inf = cpu_norm_inf_impl<complex<double> >(dims, values);
130 } else {
131 vector<double> values(value.elements());
132 value.as(f64).host(values.data());
133 norm_inf = cpu_norm_inf_impl<double>(dims, values);
134 }
135 return norm_inf;
136}
137
138using norm_params = std::tuple<af::dim4, af::dtype>;
139class Norm

Callers 1

TEST_PFunction · 0.85

Calls 5

typeMethod · 0.80
hostMethod · 0.80
asMethod · 0.80
dimsMethod · 0.45
elementsMethod · 0.45

Tested by

no test coverage detected