File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ namespace core
164
164
165
165
auto storeChunkConfig () -> internal::LoadStoreConfigWithBuffer;
166
166
167
- auto enqueueStore () -> void;
167
+ auto enqueueStore () -> std::future<void>;
168
+
169
+ auto store (EnqueuePolicy) -> void;
168
170
169
171
/* * This intentionally shadows the parent class's enqueueLoad methods in
170
172
* order to show a compile error when using enqueueLoad() on an object
Original file line number Diff line number Diff line change @@ -202,12 +202,34 @@ namespace core
202
202
}
203
203
204
204
template <typename Ptr_Type>
205
- auto ConfigureStoreChunkFromBuffer<Ptr_Type>::enqueueStore() -> void
205
+ auto
206
+ ConfigureStoreChunkFromBuffer<Ptr_Type>::enqueueStore() -> std::future<void >
207
+ {
208
+ this ->m_rc .storeChunk_impl (
209
+ asWriteBuffer (std::move (m_buffer)),
210
+ determineDatatype<auxiliary::IsPointer_t<Ptr_Type>>(),
211
+ storeChunkConfig ());
212
+ return std::async (
213
+ std::launch::deferred,
214
+ [rc_lambda = m_rc]() mutable -> void { rc_lambda.seriesFlush (); });
215
+ }
216
+
217
+ template <typename Ptr_Type>
218
+ auto
219
+ ConfigureStoreChunkFromBuffer<Ptr_Type>::store(EnqueuePolicy ep) -> void
206
220
{
207
221
this ->m_rc .storeChunk_impl (
208
222
asWriteBuffer (std::move (m_buffer)),
209
223
determineDatatype<auxiliary::IsPointer_t<Ptr_Type>>(),
210
224
storeChunkConfig ());
225
+ switch (ep)
226
+ {
227
+ case EnqueuePolicy::Defer:
228
+ break ;
229
+ case EnqueuePolicy::Immediate:
230
+ m_rc.seriesFlush ();
231
+ break ;
232
+ }
211
233
}
212
234
213
235
template <typename Ptr_Type>
You can’t perform that action at this time.
0 commit comments