File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
include/xsimd/arch/common Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,15 @@ namespace xsimd
3535 template <class A , class T >
3636 XSIMD_INLINE size_t countl_zero (batch_bool<T, A> const & self, requires_arch<common>) noexcept
3737 {
38- constexpr size_t unused_bits = sizeof ( uint64_t ) * CHAR_BIT - batch_bool<T, A>::size;
38+ constexpr size_t unused_bits = 64 - batch_bool<T, A>::size;
3939 constexpr uint64_t lower_mask = batch_bool<T, A>::size < 64 ? ((uint64_t )1 << batch_bool<T, A>::size) - 1 : (uint64_t )-1 ;
4040 return xsimd::detail::countl_zero (self.mask () & lower_mask) - unused_bits;
4141 }
4242
4343 template <class A , class T >
4444 XSIMD_INLINE size_t countl_one (batch_bool<T, A> const & self, requires_arch<common>) noexcept
4545 {
46- constexpr size_t unused_bits = sizeof ( uint64_t ) * CHAR_BIT - batch_bool<T, A>::size;
46+ constexpr size_t unused_bits = 64 - batch_bool<T, A>::size;
4747 constexpr uint64_t upper_mask = batch_bool<T, A>::size < 64 ? ~(((uint64_t )1 << batch_bool<T, A>::size) - 1 ) : (uint64_t )0 ;
4848 return xsimd::detail::countl_one (self.mask () | upper_mask) - unused_bits;
4949 }
You can’t perform that action at this time.
0 commit comments