diff --git a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp index 91117101f..dac9906cc 100644 --- a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp +++ b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp @@ -939,10 +939,6 @@ class ContiguousInternalMemoryAlgorithmDataFacade if (data_layout.GetBlockSize(storage::DataLayout::MLD_CELL_WEIGHTS) > 0) { - BOOST_ASSERT(data_layout.GetBlockSize(storage::DataLayout::MLD_CELL_SOURCE_BOUNDARY) > - 0); - BOOST_ASSERT( - data_layout.GetBlockSize(storage::DataLayout::MLD_CELL_DESTINATION_BOUNDARY) > 0); BOOST_ASSERT(data_layout.GetBlockSize(storage::DataLayout::MLD_CELLS) > 0); BOOST_ASSERT(data_layout.GetBlockSize(storage::DataLayout::MLD_CELL_LEVEL_OFFSETS) > 0); diff --git a/include/partition/cell_storage.hpp b/include/partition/cell_storage.hpp index 6c5fdde05..99ccc02a7 100644 --- a/include/partition/cell_storage.hpp +++ b/include/partition/cell_storage.hpp @@ -172,8 +172,8 @@ template class CellStorageImpl destination_boundary{all_destinations + data.destination_boundary_offset} { BOOST_ASSERT(all_weight != nullptr); - BOOST_ASSERT(all_sources != nullptr); - BOOST_ASSERT(all_destinations != nullptr); + BOOST_ASSERT(num_source_nodes == 0 || all_sources != nullptr); + BOOST_ASSERT(num_destination_nodes == 0 || all_destinations != nullptr); } }; @@ -333,8 +333,10 @@ template class CellStorageImpl const auto offset = level_to_cell_offset[level_index]; const auto cell_index = offset + id; BOOST_ASSERT(cell_index < cells.size()); - return ConstCell{ - cells[cell_index], weights.data(), source_boundary.data(), destination_boundary.data()}; + return ConstCell{cells[cell_index], + weights.data(), + source_boundary.empty() ? nullptr : source_boundary.data(), + destination_boundary.empty() ? nullptr : destination_boundary.data()}; } template > Cell GetCell(LevelID level, CellID id)