chore(compiler): fix c++11-narrowing

This commit is contained in:
Mayeul@Zama
2022-11-02 12:42:30 +01:00
committed by mayeul-zama
parent aaad84ee63
commit 28594db536
3 changed files with 13 additions and 14 deletions

View File

@@ -12,7 +12,6 @@ add_definitions("-Wno-dollar-in-identifier-extension")
# Wouldn't be able to compile LLVM without this on Mac (using either Clang or AppleClang)
if(APPLE)
add_definitions("-Wno-narrowing")
else()
add_definitions("-Wall -Werror")
endif()

View File

@@ -42,10 +42,10 @@ const std::string KEYSWITCH_KEY = "ksk_v0";
const std::string CLIENT_PARAMETERS_EXT = ".concrete.params.json";
typedef size_t DecompositionLevelCount;
typedef size_t DecompositionBaseLog;
typedef size_t PolynomialSize;
typedef size_t Precision;
typedef uint64_t DecompositionLevelCount;
typedef uint64_t DecompositionBaseLog;
typedef uint64_t PolynomialSize;
typedef uint64_t Precision;
typedef double Variance;
typedef std::vector<int64_t> CRTDecomposition;
@@ -117,8 +117,8 @@ struct PackingKeySwitchParam {
LweSecretKeyID inputSecretKeyID;
LweSecretKeyID outputSecretKeyID;
BootstrapKeyID bootstrapKeyID;
size_t level;
size_t baseLog;
DecompositionLevelCount level;
DecompositionBaseLog baseLog;
Variance variance;
void hash(size_t &seed);
@@ -151,11 +151,11 @@ static inline bool operator==(const EncryptionGate &lhs,
struct CircuitGateShape {
/// Width of the scalar value
size_t width;
uint64_t width;
/// Dimensions of the tensor, empty if scalar
std::vector<int64_t> dimensions;
/// Size of the buffer containing the tensor
size_t size;
uint64_t size;
// Indicated whether elements are signed
bool sign;
};

View File

@@ -23,19 +23,19 @@ struct CompilationFeedback {
double complexity;
/// @brief the total number of bytes of secret keys
size_t totalSecretKeysSize;
uint64_t totalSecretKeysSize;
/// @brief the total number of bytes of bootstrap keys
size_t totalBootstrapKeysSize;
uint64_t totalBootstrapKeysSize;
/// @brief the total number of bytes of keyswitch keys
size_t totalKeyswitchKeysSize;
uint64_t totalKeyswitchKeysSize;
/// @brief the total number of bytes of inputs
size_t totalInputsSize;
uint64_t totalInputsSize;
/// @brief the total number of bytes of outputs
size_t totalOutputsSize;
uint64_t totalOutputsSize;
/// Fill the sizes from the client parameters.
void