Skip to content

Commit

Permalink
Added changes and minor data type conversion fix to batchencoder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlaine committed Jul 10, 2019
1 parent 7fbaa1e commit 410f342
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# List of Changes

## Version 3.3 (current)
## Version 3.3.1 (patch)

Minor bug and typo fixes. Most importantly:
- A bug was fixed that introduced significant extra inaccuracy in CKKS when compiled on Linux, at least with some versions of glibc; Windows and macOS were not affected.
- A bug was fixed where, on 32-bit platforms, some versions of GCC resolved the util::reverse_bits function to the incorrect overload.

## Version 3.3.0

### Features

Expand Down
10 changes: 5 additions & 5 deletions native/tests/seal/batchencoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace SEALTest
BatchEncoder batch_encoder(context);
ASSERT_EQ(64ULL, batch_encoder.slot_count());
vector<int64_t> plain_vec;
for (int i = 0; i < static_cast<int>(batch_encoder.slot_count()); i++)
for (size_t i = 0; i < batch_encoder.slot_count(); i++)
{
plain_vec.push_back(static_cast<int64_t>(i * (1 - 2 * (i % 2))));
}
Expand Down Expand Up @@ -111,13 +111,13 @@ namespace SEALTest
batch_encoder.decode(plain, short_plain_vec2);
ASSERT_EQ(20ULL, short_plain_vec.size());
ASSERT_EQ(64ULL, short_plain_vec2.size());
for (int i = 0; i < 20; i++)
for (size_t i = 0; i < 20; i++)
{
ASSERT_TRUE(short_plain_vec[i] == short_plain_vec2[i]);
ASSERT_EQ(short_plain_vec[i], short_plain_vec2[i]);
}
for (int i = 20; i < static_cast<int>(batch_encoder.slot_count()); i++)
for (size_t i = 20; i < batch_encoder.slot_count(); i++)
{
ASSERT_TRUE(0LL == short_plain_vec2[i]);
ASSERT_EQ(0ULL, short_plain_vec2[i]);
}
}

Expand Down

0 comments on commit 410f342

Please sign in to comment.