blob: 9c035baf6d1b4030d31a57e1e2c32692c1661761 [file]
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cpu-features.h>
#include "base/android/jni_android.h"
// Must come after all headers that specialize FromJniType() / ToJniType().
#include "base/base_jni/CpuFeatures_jni.h"
namespace base {
namespace android {
static int32_t JNI_CpuFeatures_GetCoreCount(JNIEnv*) {
return android_getCpuCount();
}
static int64_t JNI_CpuFeatures_GetCpuFeatures(JNIEnv*) {
return static_cast<int64_t>(android_getCpuFeatures());
}
} // namespace android
} // namespace base
DEFINE_JNI(CpuFeatures)