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


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 102 of file InsertOrderFragmenter.cpp.

References g_use_table_device_offset.

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

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

+ Here is the caller graph for this function: