@@ -102,19 +102,19 @@ struct EvalKey {
102
102
void emplacebkfft (const SecretKey& sk)
103
103
{
104
104
if constexpr (std::is_same_v<P, lvl01param>) {
105
- bkfftlvl01 = std::make_unique <BootstrappingKeyFFT<lvl01param>>();
105
+ bkfftlvl01 = std::make_unique_for_overwrite <BootstrappingKeyFFT<lvl01param>>();
106
106
bkfftgen<lvl01param>(*bkfftlvl01, sk);
107
107
}
108
108
else if constexpr (std::is_same_v<P, lvlh1param>) {
109
- bkfftlvlh1 = std::make_unique <BootstrappingKeyFFT<lvlh1param>>();
109
+ bkfftlvlh1 = std::make_unique_for_overwrite <BootstrappingKeyFFT<lvlh1param>>();
110
110
bkfftgen<lvlh1param>(*bkfftlvlh1, sk);
111
111
}
112
112
else if constexpr (std::is_same_v<P, lvl02param>) {
113
- bkfftlvl02 = std::make_unique <BootstrappingKeyFFT<lvl02param>>();
113
+ bkfftlvl02 = std::make_unique_for_overwrite <BootstrappingKeyFFT<lvl02param>>();
114
114
bkfftgen<lvl02param>(*bkfftlvl02, sk);
115
115
}
116
116
else if constexpr (std::is_same_v<P, lvlh2param>) {
117
- bkfftlvlh2 = std::make_unique <BootstrappingKeyFFT<lvlh2param>>();
117
+ bkfftlvlh2 = std::make_unique_for_overwrite <BootstrappingKeyFFT<lvlh2param>>();
118
118
bkfftgen<lvlh2param>(*bkfftlvlh2, sk);
119
119
}
120
120
else
@@ -214,15 +214,15 @@ struct EvalKey {
214
214
void emplaceiksk (const SecretKey& sk)
215
215
{
216
216
if constexpr (std::is_same_v<P, lvl10param>) {
217
- iksklvl10 = std::make_unique <KeySwitchingKey<lvl10param>>();
217
+ iksklvl10 = std::make_unique_for_overwrite <KeySwitchingKey<lvl10param>>();
218
218
ikskgen<lvl10param>(*iksklvl10, sk);
219
219
}
220
220
else if constexpr (std::is_same_v<P, lvl1hparam>) {
221
- iksklvl1h = std::make_unique <KeySwitchingKey<lvl1hparam>>();
221
+ iksklvl1h = std::make_unique_for_overwrite <KeySwitchingKey<lvl1hparam>>();
222
222
ikskgen<lvl1hparam>(*iksklvl1h, sk);
223
223
}
224
224
else if constexpr (std::is_same_v<P, lvl20param>) {
225
- iksklvl20 = std::make_unique <KeySwitchingKey<lvl20param>>();
225
+ iksklvl20 = std::make_unique_for_overwrite <KeySwitchingKey<lvl20param>>();
226
226
ikskgen<lvl20param>(*iksklvl20, sk);
227
227
}
228
228
else if constexpr (std::is_same_v<P, lvl2hparam>) {
@@ -231,15 +231,15 @@ struct EvalKey {
231
231
ikskgen<lvl2hparam>(*iksklvl2h, sk);
232
232
}
233
233
else if constexpr (std::is_same_v<P, lvl21param>) {
234
- iksklvl21 = std::make_unique <KeySwitchingKey<lvl21param>>();
234
+ iksklvl21 = std::make_unique_for_overwrite <KeySwitchingKey<lvl21param>>();
235
235
ikskgen<lvl21param>(*iksklvl21, sk);
236
236
}
237
237
else if constexpr (std::is_same_v<P, lvl22param>) {
238
- iksklvl22 = std::make_unique <KeySwitchingKey<lvl22param>>();
238
+ iksklvl22 = std::make_unique_for_overwrite <KeySwitchingKey<lvl22param>>();
239
239
ikskgen<lvl22param>(*iksklvl22, sk);
240
240
}
241
241
else if constexpr (std::is_same_v<P, lvl31param>) {
242
- iksklvl31 = std::make_unique <KeySwitchingKey<lvl31param>>();
242
+ iksklvl31 = std::make_unique_for_overwrite <KeySwitchingKey<lvl31param>>();
243
243
ikskgen<lvl31param>(*iksklvl31, sk);
244
244
}
245
245
else
@@ -290,7 +290,7 @@ struct EvalKey {
290
290
{
291
291
if constexpr (std::is_same_v<P, lvl21param>) {
292
292
subprivksklvl21[key] =
293
- std::make_unique <SubsetPrivateKeySwitchingKey<lvl21param>>();
293
+ std::make_unique_for_overwrite <SubsetPrivateKeySwitchingKey<lvl21param>>();
294
294
subprivkskgen<lvl21param>(*subprivksklvl21[key], func, sk);
295
295
}
296
296
else
0 commit comments