OmniSciDB  91042dcc5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GroupByAndAggregate.h File Reference
#include "BufferCompaction.h"
#include "ColumnarResults.h"
#include "CompilationOptions.h"
#include "GpuMemUtils.h"
#include "GpuSharedMemoryContext.h"
#include "InputMetadata.h"
#include "QueryExecutionContext.h"
#include "Rendering/RenderInfo.h"
#include "RuntimeFunctions.h"
#include "QueryEngine/Utils/DiamondCodegen.h"
#include "../Shared/sqltypes.h"
#include "Logger/Logger.h"
#include <llvm/IR/Function.h>
#include <llvm/IR/Instructions.h>
#include <llvm/IR/Value.h>
#include <boost/algorithm/string/join.hpp>
#include <boost/make_unique.hpp>
#include <stack>
#include <vector>
+ Include dependency graph for GroupByAndAggregate.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  ColRangeInfo
struct  KeylessInfo
class  GroupByAndAggregate


size_t get_count_distinct_sub_bitmap_count (const size_t bitmap_sz_bits, const RelAlgExecutionUnit &ra_exe_unit, const ExecutorDeviceType device_type)


bool g_enable_smem_group_by
bool g_bigint_count

Function Documentation

size_t get_count_distinct_sub_bitmap_count ( const size_t  bitmap_sz_bits,
const RelAlgExecutionUnit ra_exe_unit,
const ExecutorDeviceType  device_type 

Definition at line 220 of file GroupByAndAggregate.h.

References g_cluster, GPU, and RelAlgExecutionUnit::groupby_exprs.

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation(), and anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors().

222  {
223  // For count distinct on a column with a very small number of distinct values
224  // contention can be very high, especially for non-grouped queries. We'll split
225  // the bitmap into multiple sub-bitmaps which are unified to get the full result.
226  // The threshold value for bitmap_sz_bits works well on Kepler.
227  return bitmap_sz_bits < 50000 && ra_exe_unit.groupby_exprs.empty() &&
228  (device_type == ExecutorDeviceType::GPU || g_cluster)
229  ? 64 // NB: must be a power of 2 to keep runtime offset computations cheap
230  : 1;
231 }
const std::list< std::shared_ptr< Analyzer::Expr > > groupby_exprs
bool g_cluster

+ Here is the caller graph for this function:

Variable Documentation

bool g_bigint_count

Definition at line 52 of file GroupByAndAggregate.cpp.

bool g_enable_smem_group_by