OmniSciDB  a5dc49c757
 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 227 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().

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