Skip to content

Commit de64647

Browse files
committed
Flag xfile as dirty when initialized
1 parent d0dd4fb commit de64647

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/xtensor-io/xchunk_store_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ namespace xt
398398

399399
template <class T, class IOH, layout_type L, class IP, class EXT, class S>
400400
inline xchunked_array<xchunk_store_manager<xfile_array<T, IOH, L>, IP>, EXT>
401-
chunked_file_array(S&& shape, S&& chunk_shape, const std::string& path, const T& init_value,std::size_t pool_size, layout_type chunk_memory_layout)
401+
chunked_file_array(S&& shape, S&& chunk_shape, const std::string& path, const T& init_value, std::size_t pool_size, layout_type chunk_memory_layout)
402402
{
403403
using chunk_storage = xchunk_store_manager<xfile_array<T, IOH, L>, IP>;
404404
chunk_storage chunks(shape, chunk_shape, path, pool_size, init_value, chunk_memory_layout);
@@ -407,7 +407,7 @@ namespace xt
407407

408408
template <class T, class IOH, layout_type L, class IP, class EXT, class S>
409409
inline xchunked_array<xchunk_store_manager<xfile_array<T, IOH, L>, IP>, EXT>
410-
chunked_file_array(std::initializer_list<S> shape, std::initializer_list<S> chunk_shape, const std::string& path, const T& init_value,std::size_t pool_size, layout_type chunk_memory_layout)
410+
chunked_file_array(std::initializer_list<S> shape, std::initializer_list<S> chunk_shape, const std::string& path, const T& init_value, std::size_t pool_size, layout_type chunk_memory_layout)
411411
{
412412
using sh_type = std::vector<std::size_t>;
413413
sh_type sh = xtl::make_sequence<sh_type>(shape.size());

include/xtensor-io/xfile_array.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ namespace xt
675675
if (m_init)
676676
{
677677
std::fill(m_storage.begin(), m_storage.end(), m_init_value);
678+
m_dirty = true;
678679
}
679680
}
680681
}

0 commit comments

Comments
 (0)