syclreference.com
  1. SYCL
  2. | API Reference
  3. | Built-Ins
  4. | fast_length

fast_length

Returns the length of vector p computed as: sqrt((half)(pow(p.x,2) + pow(p.y,2)+ ...)).


template <typename F, typename return_t, detail::enable_if_t<(computecpp::gsl::or_<detail::builtin::is_gengeohalf<F>::value, detail::builtin::is_gengeofloat<F>::value>::value), int> >
return_t fast_length(F p)
(1)
  1. Returns the length of vector p computed as: `sqrt((half)(pow(p.x,2) + pow(p.y,2)+ ...))`.
    Parameters:
    • F p

syclreference.com — SYCL Reference Pages

Last updated: 2019-01-24 00:24:52 +0000