Files
docs/dev/api/concrete.fhe.tfhers.md

1.9 KiB

module torus.fhe.tfhers

tfhers module to represent, and compute on tfhers integer values.

Global Variables

  • dtypes
  • bridge
  • specs
  • values
  • tracing

function get_type_from_params

get_type_from_params(
    path_to_params_json: str,
    is_signed: bool,
    precision: int
) → TFHERSIntegerType

Get a TFHE-rs integer type from TFHE-rs parameters in JSON format.

Args:

  • path_to_params_json (str): path to the TFHE-rs parameters (JSON format)
  • is_signed (bool): sign of the result type
  • precision (int): precision of the result type

Returns:

  • TFHERSIntegerType: constructed type from the loaded parameters

function get_type_from_params_dict

get_type_from_params_dict(
    crypto_param_dict: dict,
    is_signed: bool,
    precision: int
) → TFHERSIntegerType

Get a TFHE-rs integer type from TFHE-rs parameters in JSON format.

Args:

  • crypto_param_dict (Dict): dictionary of TFHE-rs parameters
  • is_signed (bool): sign of the result type
  • precision (int): precision of the result type

Returns:

  • TFHERSIntegerType: constructed type from the loaded parameters