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

Functions

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 320 of file ArrowResultSetConverter.cpp.

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

Referenced by ArrowResultSetConverter::getArrowResult().

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