From 63f7c1fb25fd50d78f7430cb50ae908530529806 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期三, 08 一月 2020 13:08:23 +0800
Subject: [PATCH] 实现rtk平台基础配置

---
 lib/src/main/cpp/utils/num.cpp |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/lib/src/main/cpp/utils/num.cpp b/lib/src/main/cpp/utils/num.cpp
index fe14678..0019ccf 100644
--- a/lib/src/main/cpp/utils/num.cpp
+++ b/lib/src/main/cpp/utils/num.cpp
@@ -74,3 +74,14 @@
 
     return true;
 }
+
+int BitCount(uint32_t n)
+{
+    n = (n &0x55555555) + ((n >>1) &0x55555555);
+    n = (n &0x33333333) + ((n >>2) &0x33333333);
+    n = (n &0x0f0f0f0f) + ((n >>4) &0x0f0f0f0f);
+    n = (n &0x00ff00ff) + ((n >>8) &0x00ff00ff);
+    n = (n &0x0000ffff) + ((n >>16) &0x0000ffff);
+
+    return n ;
+}

--
Gitblit v1.8.0