• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <cpu-features.h>
6 
7 #include "base/android/jni_android.h"
8 
9 // Must come after all headers that specialize FromJniType() / ToJniType().
10 #include "base/base_jni/CpuFeatures_jni.h"
11 
12 namespace base {
13 namespace android {
14 
JNI_CpuFeatures_GetCoreCount(JNIEnv *)15 jint JNI_CpuFeatures_GetCoreCount(JNIEnv*) {
16   return android_getCpuCount();
17 }
18 
JNI_CpuFeatures_GetCpuFeatures(JNIEnv *)19 jlong JNI_CpuFeatures_GetCpuFeatures(JNIEnv*) {
20   return static_cast<jlong>(android_getCpuFeatures());
21 }
22 
23 }  // namespace android
24 }  // namespace base
25