KokkosBlas::abs¶
Defined in header: KokkosBlas1_abs.hpp
template <class execution_space, class RMV, class XMV>
void abs(const execution_space& space, const RMV& R, const XMV& X);
template <class RMV, class XMV>
void abs(const RMV& R, const XMV& X);
Replaces the entries of R by the absolute value of the corresponding entries in X.
Overwrites the entries of R with the magnitude of the corresponding entries in X and fences the
space
instance.Overwrites the entries of R with the magnitude of the corresponding entries in X and fences the default instance of
typename RMV::execution_space
.
The function will throw a runtime exception if R.extent(0) != X.extent(0) || R.extent(1) != X.extent(1)
Parameters¶
- space:
execution space instance
- R:
output vector(s) storing the magnitude of the entries of
X
- X:
input vector(s)
Type Requirements¶
execution_space must be a Kokkos execution space
RMV must be a Kokkos View of rank 1 or 2 that satisfies
Kokkos::SpaceAccessibility<execution_space, typename XMV::memory_space>::accessible
std::is_same_v<typename RMV::value_type, typename RMV::non_const_value_type> == true
XMV must be a Kokkos View that satisfies
Kokkos::SpaceAccessibility<execution_space, typename XMV::memory_space>::accessible
XMV::rank == RMV::rank