Skip to content

Expose CompressionParameters struct in C API #2707

@rdlopes

Description

@rdlopes

What is the problem you want to solve and can not with the current version?

C API does not declare the structure of CompressionParameters, only

typedef struct CompressionParameters CompressionParameters;

Describe the solution you'd like

I would rather have

typedef struct CompressionParameters {
    size_t br_level;
    size_t br_base_log;
    size_t packing_ks_level;
    size_t packing_ks_base_log;
    size_t packing_ks_polynomial_size;
    size_t packing_ks_glwe_dimension;
    size_t lwe_per_glwe;
    size_t storage_log_modulus;
    DynamicDistribution packing_ks_key_noise_distribution;
} CompressionParameters;

Describe alternatives you've considered

For the moment, I have no other alternative than defining the layout myself in my Java wrapper.
But it's a lot of boilerplate I would easily get rid of...
https://github.com/rdlopes/tfhe-java/blob/main/src/main/java/io/github/rdlopes/tfhe/ffm/TfheWrapper.java

Additional context

This feature request is more of a quality-of-life request, as the tool for generating Java bindings, namely jextract, does not generate memory layouts when structures are not entirely defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature_requestSomething I need does not exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions