OmniSciDB  2e3a973ef4
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

◆ compute_device_for_fragment()

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

References g_use_table_device_offset.

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

102  {
104  return (table_id + fragment_id) % num_devices;
105  } else {
106  return fragment_id % num_devices;
107  }
108 }
bool g_use_table_device_offset
+ Here is the caller graph for this function: