зеркало из https://github.com/microsoft/SEAL.git
Merge pull request #282 from fboemer/fboemer/minor-fixes
Fix a few typos and minor changes
This commit is contained in:
Коммит
5d27dc0c2e
|
@ -937,7 +937,7 @@ namespace Microsoft.Research.SEAL
|
||||||
/// Multiplies a ciphertext with a plaintext and stores the result in encrypted.
|
/// Multiplies a ciphertext with a plaintext and stores the result in encrypted.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Multiplies a ciphertext with a plaintext. The plaintext cannot be identially 0. Dynamic memory allocations
|
/// Multiplies a ciphertext with a plaintext. The plaintext cannot be identically 0. Dynamic memory allocations
|
||||||
/// in the process are allocated from the memory pool pointed to by the given MemoryPoolHandle.
|
/// in the process are allocated from the memory pool pointed to by the given MemoryPoolHandle.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="encrypted">The ciphertext to multiply</param>
|
/// <param name="encrypted">The ciphertext to multiply</param>
|
||||||
|
@ -961,7 +961,7 @@ namespace Microsoft.Research.SEAL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This function multiplies a ciphertext with a plaintext and stores the result in the destination parameter.
|
/// This function multiplies a ciphertext with a plaintext and stores the result in the destination parameter.
|
||||||
/// The plaintext cannot be identially 0. Dynamic memory allocations in the process are allocated from the
|
/// The plaintext cannot be identically 0. Dynamic memory allocations in the process are allocated from the
|
||||||
/// memory pool pointed to by the given MemoryPoolHandle.
|
/// memory pool pointed to by the given MemoryPoolHandle.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="encrypted">The ciphertext to multiply</param>
|
/// <param name="encrypted">The ciphertext to multiply</param>
|
||||||
|
|
|
@ -102,6 +102,8 @@ namespace sealbench
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
Initialize(&argc, argv);
|
||||||
|
|
||||||
cout << "Microsoft SEAL version: " << SEAL_VERSION << endl;
|
cout << "Microsoft SEAL version: " << SEAL_VERSION << endl;
|
||||||
cout << "Running precomputations ..." << endl;
|
cout << "Running precomputations ..." << endl;
|
||||||
|
|
||||||
|
@ -149,7 +151,6 @@ int main(int argc, char **argv)
|
||||||
sealbench::register_bm_family(i, bm_env_map);
|
sealbench::register_bm_family(i, bm_env_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
Initialize(&argc, argv);
|
|
||||||
RunSpecifiedBenchmarks();
|
RunSpecifiedBenchmarks();
|
||||||
|
|
||||||
// After running all benchmark cases, we print again the total memory consumption by SEAL memory pool.
|
// After running all benchmark cases, we print again the total memory consumption by SEAL memory pool.
|
||||||
|
|
|
@ -708,7 +708,7 @@ namespace seal
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Multiplies a ciphertext with a plaintext. The plaintext cannot be identially 0. Dynamic memory allocations in
|
Multiplies a ciphertext with a plaintext. The plaintext cannot be identically 0. Dynamic memory allocations in
|
||||||
the process are allocated from the memory pool pointed to by the given MemoryPoolHandle.
|
the process are allocated from the memory pool pointed to by the given MemoryPoolHandle.
|
||||||
|
|
||||||
@param[in] encrypted The ciphertext to multiply
|
@param[in] encrypted The ciphertext to multiply
|
||||||
|
@ -725,7 +725,7 @@ namespace seal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Multiplies a ciphertext with a plaintext. This function multiplies a ciphertext with a plaintext and stores the
|
Multiplies a ciphertext with a plaintext. This function multiplies a ciphertext with a plaintext and stores the
|
||||||
result in the destination parameter. The plaintext cannot be identially 0. Dynamic memory allocations in the
|
result in the destination parameter. The plaintext cannot be identically 0. Dynamic memory allocations in the
|
||||||
process are allocated from the memory pool pointed to by the given MemoryPoolHandle.
|
process are allocated from the memory pool pointed to by the given MemoryPoolHandle.
|
||||||
|
|
||||||
@param[in] encrypted The ciphertext to multiply
|
@param[in] encrypted The ciphertext to multiply
|
||||||
|
|
|
@ -231,7 +231,7 @@ namespace seal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns (operand1 * operand2) mod modulus.
|
Returns (operand1 * operand2) mod modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
SEAL_NODISCARD inline std::uint64_t multiply_uint_mod(
|
SEAL_NODISCARD inline std::uint64_t multiply_uint_mod(
|
||||||
std::uint64_t operand1, std::uint64_t operand2, const Modulus &modulus)
|
std::uint64_t operand1, std::uint64_t operand2, const Modulus &modulus)
|
||||||
|
@ -327,7 +327,7 @@ namespace seal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns value[0] = value mod modulus.
|
Returns value[0] = value mod modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
inline void modulo_uint_inplace(std::uint64_t *value, std::size_t value_uint64_count, const Modulus &modulus)
|
inline void modulo_uint_inplace(std::uint64_t *value, std::size_t value_uint64_count, const Modulus &modulus)
|
||||||
{
|
{
|
||||||
|
@ -364,7 +364,7 @@ namespace seal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns value mod modulus.
|
Returns value mod modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
SEAL_NODISCARD inline std::uint64_t modulo_uint(
|
SEAL_NODISCARD inline std::uint64_t modulo_uint(
|
||||||
const std::uint64_t *value, std::size_t value_uint64_count, const Modulus &modulus)
|
const std::uint64_t *value, std::size_t value_uint64_count, const Modulus &modulus)
|
||||||
|
@ -402,7 +402,7 @@ namespace seal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns (operand1 * operand2) + operand3 mod modulus.
|
Returns (operand1 * operand2) + operand3 mod modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
inline std::uint64_t multiply_add_uint_mod(
|
inline std::uint64_t multiply_add_uint_mod(
|
||||||
std::uint64_t operand1, std::uint64_t operand2, std::uint64_t operand3, const Modulus &modulus)
|
std::uint64_t operand1, std::uint64_t operand2, std::uint64_t operand3, const Modulus &modulus)
|
||||||
|
@ -432,22 +432,22 @@ namespace seal
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns operand^exponent mod modulus.
|
Returns operand^exponent mod modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
SEAL_NODISCARD std::uint64_t exponentiate_uint_mod(
|
SEAL_NODISCARD std::uint64_t exponentiate_uint_mod(
|
||||||
std::uint64_t operand, std::uint64_t exponent, const Modulus &modulus);
|
std::uint64_t operand, std::uint64_t exponent, const Modulus &modulus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Computes numerator = numerator mod modulus, quotient = numerator / modulus.
|
Computes numerator = numerator mod modulus, quotient = numerator / modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
void divide_uint_mod_inplace(
|
void divide_uint_mod_inplace(
|
||||||
std::uint64_t *numerator, const Modulus &modulus, std::size_t uint64_count, std::uint64_t *quotient,
|
std::uint64_t *numerator, const Modulus &modulus, std::size_t uint64_count, std::uint64_t *quotient,
|
||||||
MemoryPool &pool);
|
MemoryPool &pool);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Computes <opearnd1, operand2> mod modulus.
|
Computes <operand1, operand2> mod modulus.
|
||||||
Correctness: Follows the condition of barret_reduce_128.
|
Correctness: Follows the condition of barrett_reduce_128.
|
||||||
*/
|
*/
|
||||||
SEAL_NODISCARD std::uint64_t dot_product_mod(
|
SEAL_NODISCARD std::uint64_t dot_product_mod(
|
||||||
const std::uint64_t *operand1, const std::uint64_t *operand2, std::size_t count, const Modulus &modulus);
|
const std::uint64_t *operand1, const std::uint64_t *operand2, std::size_t count, const Modulus &modulus);
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ namespace sealtest
|
||||||
vector<uint64_t> in(poly_modulus_degree * rns_tool->base_q()->size());
|
vector<uint64_t> in(poly_modulus_degree * rns_tool->base_q()->size());
|
||||||
set_zero_uint(in.size(), in.data());
|
set_zero_uint(in.size(), in.data());
|
||||||
RNSIter in_iter(in.data(), poly_modulus_degree);
|
RNSIter in_iter(in.data(), poly_modulus_degree);
|
||||||
rns_tool->divide_and_round_q_last_inplace(in_iter, pool);
|
rns_tool->divide_and_round_q_last_ntt_inplace(in_iter, ntt, pool);
|
||||||
ASSERT_EQ(0ULL, in[0]);
|
ASSERT_EQ(0ULL, in[0]);
|
||||||
ASSERT_EQ(0ULL, in[1]);
|
ASSERT_EQ(0ULL, in[1]);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче