paleolimbot commented on code in PR #40807:
URL: https://github.com/apache/arrow/pull/40807#discussion_r1541369648
##########
cpp/src/arrow/record_batch.h:
##########
@@ -254,6 +255,16 @@ class ARROW_EXPORT RecordBatch {
/// \return Status
virtual Status ValidateFull() const;
+ /// \brief Return a top-level sync event object for this record batch
+ ///
+ /// If all of the data for this record batch is in host memory, then this
+ /// should return null (the default impl). If the data for this batch is
+ /// on a device, then if synchronization is needed before accessing the
+ /// data the returned sync event will allow for it.
+ ///
+ /// \return null or a Device::SyncEvent
+ virtual std::shared_ptr<Device::SyncEvent> GetSyncEvent();
Review Comment:
Got it! Making sure the buffers had access to the event is what I was
worried about. I can't speak to how this would be used at the `Array` or
`RecordBatch` level but it might be helpful to explain that in a comment for
those of us that don't run into sync events that often.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]