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:

committed by
GitHub

parent
b1fa492d8f
commit
dfdac6adfc
11
ndk_compat/ndk-compat-test.c
Normal file
11
ndk_compat/ndk-compat-test.c
Normal 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__
|
||||
}
|
Reference in New Issue
Block a user