OmniSciDB  72c90bc290
 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.

Classes

struct  ColRangeInfo
 
struct  KeylessInfo
 
class  GroupByAndAggregate
 

Functions

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

Variables

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 
)
inline

Definition at line 225 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().

227  {
228  // For count distinct on a column with a very small number of distinct values
229  // contention can be very high, especially for non-grouped queries. We'll split
230  // the bitmap into multiple sub-bitmaps which are unified to get the full result.
231  // The threshold value for bitmap_sz_bits works well on Kepler.
232  return bitmap_sz_bits < 50000 && ra_exe_unit.groupby_exprs.empty() &&
233  (device_type == ExecutorDeviceType::GPU || g_cluster)
234  ? 64 // NB: must be a power of 2 to keep runtime offset computations cheap
235  : 1;
236 }
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 54 of file GroupByAndAggregate.cpp.

bool g_enable_smem_group_by