OmniSciDB  4201147b46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{StringDictionary.cpp}::ThreadInfo Struct Reference

Public Member Functions

 ThreadInfo (const int64_t max_thread_count, const int64_t num_elems, const int64_t target_elems_per_thread)
 

Public Attributes

int64_t num_threads {0}
 
int64_t num_elems_per_thread
 

Detailed Description

Definition at line 95 of file StringDictionary.cpp.

Constructor & Destructor Documentation

anonymous_namespace{StringDictionary.cpp}::ThreadInfo::ThreadInfo ( const int64_t  max_thread_count,
const int64_t  num_elems,
const int64_t  target_elems_per_thread 
)
inline

Definition at line 99 of file StringDictionary.cpp.

References ThreadInfo::num_elems_per_thread, and ThreadInfo::num_threads.

101  {
102  num_threads =
103  std::min(std::max(max_thread_count, int64_t(1)),
104  ((num_elems + target_elems_per_thread - 1) / target_elems_per_thread));
106  std::max((num_elems + num_threads - 1) / num_threads, int64_t(1));
107  }

Member Data Documentation

int64_t anonymous_namespace{StringDictionary.cpp}::ThreadInfo::num_elems_per_thread

Definition at line 97 of file StringDictionary.cpp.

int64_t anonymous_namespace{StringDictionary.cpp}::ThreadInfo::num_threads {0}

Definition at line 96 of file StringDictionary.cpp.


The documentation for this struct was generated from the following file: