Skip to content

Commit

Permalink
Modified CMake to use GSL 3.0.1, and replaced gsl::span::index_type w…
Browse files Browse the repository at this point in the history
…ith size_type.
  • Loading branch information
Wei Dai committed Apr 28, 2020
1 parent 1bcd219 commit c40a233
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions native/src/seal/batchencoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ namespace seal

// First write the values to destination coefficients. Read
// in top row, then bottom row.
using index_type = decltype(values_matrix)::index_type;
using index_type = decltype(values_matrix)::size_type;
for (size_t i = 0; i < values_matrix_size; i++)
{
*(destination.data() + matrix_reps_index_map_[i]) = values_matrix[static_cast<index_type>(i)];
Expand Down Expand Up @@ -267,7 +267,7 @@ namespace seal

// First write the values to destination coefficients. Read
// in top row, then bottom row.
using index_type = decltype(values_matrix)::index_type;
using index_type = decltype(values_matrix)::size_type;
for (size_t i = 0; i < values_matrix_size; i++)
{
*(destination.data() + matrix_reps_index_map_[i]) =
Expand Down Expand Up @@ -436,7 +436,7 @@ namespace seal

auto &context_data = *context_->first_context_data();

using index_type = decltype(destination)::index_type;
using index_type = decltype(destination)::size_type;
if (unsigned_gt(destination.size(), numeric_limits<int>::max()) || unsigned_neq(destination.size(), slots_))
{
throw invalid_argument("destination has incorrect size");
Expand Down Expand Up @@ -479,7 +479,7 @@ namespace seal
auto &context_data = *context_->first_context_data();
uint64_t modulus = context_data.parms().plain_modulus().value();

using index_type = decltype(destination)::index_type;
using index_type = decltype(destination)::size_type;
if (unsigned_gt(destination.size(), numeric_limits<int>::max()) || unsigned_neq(destination.size(), slots_))
{
throw invalid_argument("destination has incorrect size");
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/msgsl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

cmake_minimum_required(VERSION 3.12)

project(MSGSL_DOWNLOAD VERSION 2.1.0)
project(MSGSL_DOWNLOAD VERSION 3.0.1)

if(EXISTS cache_init.txt)
set(MSGSL_CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DGSL_TEST=OFF -C../cache_init.txt)
Expand Down

0 comments on commit c40a233

Please sign in to comment.