# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.

language = "C"
header = '''
/* Generated by cbindgen - do not edit manually */

#ifndef PAIMON_VINDEX_H
#define PAIMON_VINDEX_H
'''
autogen_warning = "/* Warning: this file is autogenerated by cbindgen. Don't modify this manually. */"
after_includes = '''
#include <stddef.h>
'''
trailer = '''
/**
 * Exact initialized-prefix size for the first extended search parameter ABI.
 *
 * Do not replace this with sizeof(PaimonVindexSearchParamsEx): sizeof may
 * include tail padding that a future ABI revision can reuse for another field.
 */
#define PAIMON_VINDEX_SEARCH_PARAMS_EX_V1_SIZE \
    (offsetof(PaimonVindexSearchParamsEx, ivfpq_batch_table_reuse_max_bytes) + \
     sizeof(((PaimonVindexSearchParamsEx *)0)->ivfpq_batch_table_reuse_max_bytes))

/**
 * Returns V1 extended search parameters initialized with semantic defaults.
 */
static inline PaimonVindexSearchParamsEx paimon_vindex_search_params_ex_default(void) {
    PaimonVindexSearchParamsEx params;
    params.struct_size = PAIMON_VINDEX_SEARCH_PARAMS_EX_V1_SIZE;
    params.top_k = 0;
    params.search_width = PAIMON_VINDEX_SEARCH_WIDTH_AUTO;
    params.width = 0;
    params.max_initial_filter_expansion_factor = 0;
    params.ivfpq_batch_table_reuse = PAIMON_VINDEX_IVFPQ_BATCH_TABLE_REUSE_AUTO;
    params.ivfpq_batch_table_reuse_max_bytes =
        PAIMON_VINDEX_DEFAULT_IVFPQ_BATCH_TABLE_REUSE_MAX_BYTES;
    return params;
}

#endif  /* PAIMON_VINDEX_H */
'''
tab_width = 4
style = "both"

[export]
prefix = ""

[enum]
rename_variants = "ScreamingSnakeCase"
prefix_with_name = true

[fn]
rename_args = "None"
