chromium/third_party/mediapipe/src/mediapipe/util/cpu_util.cc

// Copyright 2019 The MediaPipe Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "mediapipe/util/cpu_util.h"

#include <cmath>
#include <cstdint>

#ifdef __ANDROID__
#include "ndk/sources/android/cpufeatures/cpu-features.h"
#elif _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <fstream>

#include "absl/algorithm/container.h"
#include "absl/strings/match.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/substitute.h"
#include "mediapipe/framework/port/canonical_errors.h"
#include "mediapipe/framework/port/statusor.h"

namespace mediapipe {
namespace {

constexpr uint32_t kBufferLength =;

absl::StatusOr<std::string> GetFilePath(int cpu) {}

absl::StatusOr<uint64_t> GetCpuMaxFrequency(int cpu) {}

std::set<int> InferLowerOrHigherCoreIds(bool lower) {}
}  // namespace

int NumCPUCores() {}

std::set<int> InferLowerCoreIds() {}

std::set<int> InferHigherCoreIds() {}

}  // namespace mediapipe.