OmniSciDB  bf83d84833
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
arrow Namespace Reference


key_t get_and_copy_to_shm (const std::shared_ptr< Buffer > &data)

Function Documentation

key_t arrow::get_and_copy_to_shm ( const std::shared_ptr< Buffer > &  data)

Definition at line 297 of file ArrowResultSetConverter.cpp.

References anonymous_namespace{ArrowResultSetConverter.cpp}::get_shm().

Referenced by ArrowResultSetConverter::getArrowResult().

297  {
298 #ifdef _MSC_VER
299  throw std::runtime_error("Arrow IPC not yet supported on Windows.");
300 #else
301  auto [key, ipc_ptr] = get_shm(data->size());
302  // copy the arrow records buffer to shared memory
303  // TODO(ptaylor): I'm sure it's possible to tell Arrow's RecordBatchStreamWriter to
304  // write directly to the shared memory segment as a sink
305  memcpy(ipc_ptr, data->data(), data->size());
306  // detach from the shared memory segment
307  shmdt(ipc_ptr);
308  return key;
309 #endif
310 }
std::pair< key_t, void * > get_shm(size_t shmsz)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: