OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ThreadInfo Struct Reference

#include <ThreadInfo.h>

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 21 of file ThreadInfo.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file ThreadInfo.h.

References num_elems_per_thread, and num_threads.

27  {
28  num_threads =
29  std::min(std::max(max_thread_count, int64_t(1)),
30  ((num_elems + target_elems_per_thread - 1) / target_elems_per_thread));
32  std::max((num_elems + num_threads - 1) / num_threads, int64_t(1));
33  }
int64_t num_elems_per_thread
Definition: ThreadInfo.h:23
int64_t num_threads
Definition: ThreadInfo.h:22

Member Data Documentation

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