// Copyright 2026 The Google Research 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.
edition = "2023";
package research_scann;
import "scann/distance_measures/one_to_many/scale_encoding.proto";
import "scann/proto/centers.proto";
import "scann/proto/exact_reordering.proto";
import "scann/proto/hash.proto";
import "scann/utils/fixed_point/fixed_point_training_results.proto";
message AsymmetricHashingCodec {
AsymmetricHasherConfig model_config = 1;
CentersForAllSubspaces model_data = 2;
}
message FixedPointCodec {
oneof fixed_point_method {
float multiplier = 1;
FixedPointTrainingResults training_results = 2;
}
int32 dimension = 3;
ScaleEncoding scale_encoding = 4;
int32 per_dimension_bits = 5 [default = 8];
}
message Codec {
oneof coding_scheme {
AsymmetricHashingCodec asymmetric_hash = 1;
FixedPointCodec fixed_point = 2;
}
}
message CodecConfig {
oneof config {
AsymmetricHasherConfig ah_config = 1;
FixedPoint fp_config = 2;
}
}