OmniSciDB  04ee39c94c
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 ()
 

Function Documentation

◆ cpu_threads()

int cpu_threads ( )
inline

Definition at line 23 of file thread_count.h.

Referenced by OverlapsJoinHashTable::approximateTupleCount(), BaselineJoinHashTable::approximateTupleCount(), Importer_NS::DataStreamSink::archivePlumber(), ColumnarResults::ColumnarResults(), Fragmenter_Namespace::InsertOrderFragmenter::compactRows(), anonymous_namespace{ProfileTest.cpp}::AggregateEmulator< KeyT, ValT >::compare(), OverlapsJoinHashTable::computeBucketSizes(), StringDictionary::copyStrings(), CodeGenerator::createInValuesBitmap(), Executor::executeWorkUnitImpl(), get_device_parameters(), anonymous_namespace{RelAlgTranslator.cpp}::get_in_values_expr(), ArrowResultSetConverter::getArrowBatch(), StringDictionary::getEquals(), RelAlgTranslator::getInIntegerSetExpr(), StringDictionary::getLike(), StringDictionary::getRegexpLike(), Fragmenter_Namespace::InsertOrderFragmenter::getVacuumOffsets(), anonymous_namespace{ProfileTest.cpp}::init_groups_on_host(), OverlapsJoinHashTable::initHashTableOnCpu(), BaselineJoinHashTable::initHashTableOnCpu(), JoinHashTable::initHashTableOnCpu(), JoinHashTable::initOneToManyHashTableOnCpu(), ColumnarResults::materializeAllColumnsPerfectHash(), ColumnarResults::materializeAllLazyColumns(), ResultSetStorage::moveEntriesToBuffer(), StorageIOFacility< RelAlgExecutorTraits >::normalized_cpu_threads(), ResultSet::parallelRowCount(), ResultSet::parallelTop(), ResultSetStorage::reduce(), anonymous_namespace{ProfileTest.cpp}::AggregateEmulator< KeyT, ValT >::run(), anonymous_namespace{ProfileTest.cpp}::Deduplicater< isColumnar, KeyT >::run(), anonymous_namespace{InputMetadata.cpp}::synthesize_metadata(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().

23  {
24  // could use std::thread::hardware_concurrency(), but some
25  // slightly out-of-date compilers (gcc 4.7) implement it as always 0.
26  // Play it POSIX.1 safe instead.
27  return std::max(2 * sysconf(_SC_NPROCESSORS_CONF), 1L);
28 }
+ Here is the caller graph for this function: