OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 323 of file ArrowResultSetConverter.cpp.

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

Referenced by ArrowResultSetConverter::getArrowResult().

323  {
324 #ifdef _MSC_VER
325  throw std::runtime_error("Arrow IPC not yet supported on Windows.");
326 #else
327  auto [key, ipc_ptr] = get_shm(data->size());
328  // copy the arrow records buffer to shared memory
329  // TODO(ptaylor): I'm sure it's possible to tell Arrow's RecordBatchStreamWriter to
330  // write directly to the shared memory segment as a sink
331  memcpy(ipc_ptr, data->data(), data->size());
332  // detach from the shared memory segment
333  shmdt(ipc_ptr);
334  return key;
335 #endif
336 }
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: