24 #ifndef ARM_COMPUTE_UTILS_HELPERS_BIT_OPS_H 25 #define ARM_COMPUTE_UTILS_HELPERS_BIT_OPS_H 29 #include <type_traits> 44 template <typename T, ARM_COMPUTE_REQUIRES_TA(std::is_integral<T>::value)>
47 return (v & 1 << idx) != 0;
bool is_bit_set(T v, unsigned int idx)
Checks if the idx-th bit is set in an integral type.
Copyright (c) 2017-2021 Arm Limited.