OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fragmenter_Namespace::anonymous_namespace{InsertOrderFragmenter.cpp} Namespace Reference

Functions

int compute_device_for_fragment (const int table_id, const int fragment_id, const int num_devices)
 

Function Documentation

int Fragmenter_Namespace::anonymous_namespace{InsertOrderFragmenter.cpp}::compute_device_for_fragment ( const int  table_id,
const int  fragment_id,
const int  num_devices 
)

Offset the fragment ID by the table ID, meaning single fragment tables end up balanced across multiple GPUs instead of all falling to GPU 0.

Definition at line 103 of file InsertOrderFragmenter.cpp.

References g_use_table_device_offset.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::createNewFragment(), and Fragmenter_Namespace::InsertOrderFragmenter::getChunkMetadata().

105  {
107  return (table_id + fragment_id) % num_devices;
108  } else {
109  return fragment_id % num_devices;
110  }
111 }
bool g_use_table_device_offset

+ Here is the caller graph for this function: