1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 21:31:15 +02:00

Add partial implementation of ndk_compat (#54)

* First implementation of ndk_compat
* Restrict building of linux_based_hardware_detection to UNIX
* Fix variable declaration and printf formatting
* Restrict ndk compat to UNIX style systems
* Restrict cpu_mask index to 32
* Fix values display in ndk-compat-test
* Addressing comments
This commit is contained in:
Guillaume Chatelet
2019-01-17 18:00:21 +01:00
committed by GitHub
parent b1fa492d8f
commit dfdac6adfc
14 changed files with 662 additions and 88 deletions

View File

@ -0,0 +1,11 @@
#include <stdio.h>
#include "cpu-features.h"
int main() {
printf("android_getCpuFamily()=%d\n", android_getCpuFamily());
printf("android_getCpuFeatures()=0x%08llx\n", android_getCpuFeatures());
printf("android_getCpuCount()=%d\n", android_getCpuCount());
#ifdef __arm__
printf("android_getCpuIdArm()=0x%04x\n", android_getCpuIdArm());
#endif //__arm__
}