OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
thread_count.h File Reference
#include <unistd.h>
#include <algorithm>
+ Include dependency graph for thread_count.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int cpu_threads ()
 

Variables

std::size_t g_cpu_threads_override
 

Function Documentation

int cpu_threads ( )
inline

Definition at line 25 of file thread_count.h.

References g_cpu_threads_override.

Referenced by Catalog_Namespace::Catalog::adjustAlteredTableFiles(), OverlapsJoinHashTable::approximateTupleCount(), BaselineJoinHashTable::approximateTupleCount(), Fragmenter_Namespace::InsertOrderFragmenter::compactRows(), OverlapsJoinHashTable::computeBucketSizes(), StringDictionary::copyStrings(), CodeGenerator::createInValuesBitmap(), Executor::executeWorkUnitImpl(), anonymous_namespace{RelAlgTranslator.cpp}::get_in_values_expr(), ArrowResultSetConverter::getArrowBatch(), StringDictionary::getEquals(), RelAlgTranslator::getInIntegerSetExpr(), StringDictionary::getLike(), StringDictionary::getRegexpLike(), Fragmenter_Namespace::InsertOrderFragmenter::getVacuumOffsets(), OverlapsJoinHashTable::initHashTableOnCpu(), BaselineJoinHashTable::initHashTableOnCpu(), JoinHashTable::initHashTableOnCpu(), JoinHashTable::initOneToManyHashTableOnCpu(), ColumnarResults::materializeAllColumnsGroupBy(), ColumnarResults::materializeAllColumnsThroughIteration(), ColumnarResults::materializeAllLazyColumns(), ResultSetStorage::moveEntriesToBuffer(), StorageIOFacility< RelAlgExecutorTraits >::normalized_cpu_threads(), ResultSet::parallelRowCount(), ResultSet::parallelTop(), ResultSetStorage::reduce(), anonymous_namespace{InputMetadata.cpp}::synthesize_metadata(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().

25  {
26  // could use std::thread::hardware_concurrency(), but some
27  // slightly out-of-date compilers (gcc 4.7) implement it as always 0.
28  // Play it POSIX.1 safe instead.
29  auto ov = g_cpu_threads_override;
30  return (ov <= 0) ? std::max(2 * sysconf(_SC_NPROCESSORS_CONF), 1L) : ov;
31 }
std::size_t g_cpu_threads_override

+ Here is the caller graph for this function:

Variable Documentation

std::size_t g_cpu_threads_override

Definition at line 19 of file thread_count.cpp.

Referenced by cpu_threads().