chromium/third_party/ruy/src/ruy/ctx.cc

/* Copyright 2019 Google LLC. All Rights Reserved.

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 "ruy/ctx.h"

#include <cstdlib>
#include <functional>
#include <string>

#include "ruy/check_macros.h"
#include "ruy/cpuinfo.h"
#include "ruy/ctx_impl.h"
#include "ruy/have_built_path_for.h"
#include "ruy/path.h"
#include "ruy/performance_advisory.h"
#include "ruy/platform.h"
#include "ruy/strategy_controls.h"
#include "ruy/prepacked_cache.h"
#include "ruy/trace.h"

namespace ruy {

const CtxImpl& Ctx::impl() const {}
CtxImpl* Ctx::mutable_impl() {}

Path Ctx::last_used_path() const {}
Tuning Ctx::explicit_tuning() const {}
void Ctx::set_explicit_tuning(Tuning value) {}
const ThreadPool& Ctx::thread_pool() const {}
ThreadPool* Ctx::mutable_thread_pool() {}
int Ctx::max_num_threads() const {}
void Ctx::set_max_num_threads(int value) {}
void Ctx::clear_performance_advisories() {}
void Ctx::set_performance_advisory(PerformanceAdvisory advisory) {}
bool Ctx::performance_advisory(PerformanceAdvisory advisory) const {}
void Ctx::set_num_threads_strategy(NumThreadsStrategy strategy) {}
NumThreadsStrategy Ctx::num_threads_strategy() const {}

void Ctx::SetRuntimeEnabledPaths(Path paths) {}

CpuInfo* Ctx::mutable_cpuinfo() {}

namespace {

int GetHexIntEnvVarOrZero(const char* name) {}

// For each Path bit set in `paths_to_test`, performs runtime detection and
// sets the corresponding bit in the return value if and only if it is
// supported. Path bits that are not set in the input
// `paths_to_detect` value are also left not set in the return value.
Path DetectRuntimeSupportedPaths(Path paths_to_detect, CpuInfo* cpuinfo) {}

}  // namespace

Path Ctx::GetRuntimeEnabledPaths() {}

Path Ctx::SelectPath(Path compiled_paths) {}

void Ctx::EnsureThreadSpecificResources(int thread_count) {}

TuningResolver* Ctx::GetThreadSpecificTuningResolver(int thread_index) const {}

Allocator* Ctx::GetThreadSpecificAllocator(int thread_index) const {}

Allocator* Ctx::GetMainAllocator() {}

PrepackedCache* Ctx::GetPrepackedCache() {}

Tuning Ctx::GetMainThreadTuning() {}

void Ctx::ClearPrepackedCache() {}

}  // namespace ruy