chromium/components/assist_ranker/ranker_example_util.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/assist_ranker/ranker_example_util.h"

#include <math.h>

#include "base/bit_cast.h"
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/metrics/metrics_hashes.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"

namespace assist_ranker {
namespace {
const uint64_t MASK32Bits =;
constexpr int kFloatMainDigits =;
// Returns lower 32 bits of the hash of the input.
int32_t StringToIntBits(const std::string& str) {}

// Converts float to int32
int32_t FloatToIntBits(float f) {}

// Pair type, value and index into one int64.
int64_t PairInt(const uint64_t type,
                const uint32_t value,
                const uint64_t index) {}

}  // namespace

bool SafeGetFeature(const std::string& key,
                    const RankerExample& example,
                    Feature* feature) {}

bool GetFeatureValueAsFloat(const std::string& key,
                            const RankerExample& example,
                            float* value) {}

bool FeatureToInt64(const Feature& feature,
                    int64_t* const res,
                    const int index) {}

bool GetOneHotValue(const std::string& key,
                    const RankerExample& example,
                    std::string* value) {}

// Converts string to a hex hash string.
std::string HashFeatureName(const std::string& feature_name) {}

RankerExample HashExampleFeatureNames(const RankerExample& example) {}

}  // namespace assist_ranker