#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 = …;
int32_t StringToIntBits(const std::string& str) { … }
int32_t FloatToIntBits(float f) { … }
int64_t PairInt(const uint64_t type,
const uint32_t value,
const uint64_t index) { … }
}
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) { … }
std::string HashFeatureName(const std::string& feature_name) { … }
RankerExample HashExampleFeatureNames(const RankerExample& example) { … }
}