cpu_features.cc 556 B

12345678910111213141516171819202122
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include <cpu-features.h>
  5. #include "base/android/jni_android.h"
  6. #include "base/base_jni_headers/CpuFeatures_jni.h"
  7. namespace base {
  8. namespace android {
  9. jint JNI_CpuFeatures_GetCoreCount(JNIEnv*) {
  10. return android_getCpuCount();
  11. }
  12. jlong JNI_CpuFeatures_GetCpuFeatures(JNIEnv*) {
  13. return static_cast<jlong>(android_getCpuFeatures());
  14. }
  15. } // namespace android
  16. } // namespace base