本文整理汇总了C++中CodeGen::Call方法的典型用法代码示例。如果您正苦于以下问题:C++ CodeGen::Call方法的具体用法?C++ CodeGen::Call怎么用?C++ CodeGen::Call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeGen
的用法示例。
在下文中一共展示了CodeGen::Call方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void TableScanTranslator::ScanConsumer::FilterRowsByVisibility(
CodeGen &codegen, llvm::Value *tid_start, llvm::Value *tid_end,
Vector &selection_vector) const {
llvm::Value *executor_context_ptr =
translator_.GetCompilationContext().GetExecutorContextPtr();
llvm::Value *txn = codegen.Call(ExecutorContextProxy::GetTransaction,
{executor_context_ptr});
llvm::Value *raw_sel_vec = selection_vector.GetVectorPtr();
// Invoke TransactionRuntime::PerformRead(...)
llvm::Value *out_idx =
codegen.Call(TransactionRuntimeProxy::PerformVectorizedRead,
{txn, tile_group_ptr_, tid_start, tid_end, raw_sel_vec});
selection_vector.SetNumElements(out_idx);
}
示例2: SortTopKParallel
void Sorter::SortTopKParallel(CodeGen &codegen, llvm::Value *sorter_ptr,
llvm::Value *thread_states,
uint32_t sorter_offset, uint64_t top_k) const {
auto *offset = codegen.Const32(sorter_offset);
codegen.Call(SorterProxy::SortTopKParallel,
{sorter_ptr, thread_states, offset, codegen.Const64(top_k)});
}
示例3: Init
void Sorter::Init(CodeGen &codegen, llvm::Value *sorter_ptr,
llvm::Value *executor_ctx,
llvm::Value *comparison_func) const {
auto *tuple_size = codegen.Const32(storage_format_.GetStorageSize());
codegen.Call(SorterProxy::Init,
{sorter_ptr, executor_ctx, comparison_func, tuple_size});
}
示例4: StoreTupleForTopK
void Sorter::StoreTupleForTopK(CodeGen &codegen, llvm::Value *sorter_ptr,
const std::vector<codegen::Value> &tuple,
uint64_t top_k) const {
// Allocate room
auto *space = codegen.Call(SorterProxy::StoreTupleForTopK,
{sorter_ptr, codegen.Const64(top_k)});
// Serialize tuple
UpdateableStorage::NullBitmap null_bitmap(codegen, storage_format_, space);
for (uint32_t col_id = 0; col_id < tuple.size(); col_id++) {
storage_format_.SetValue(codegen, space, col_id, tuple[col_id],
null_bitmap);
}
null_bitmap.WriteBack(codegen);
// Finish
codegen.Call(SorterProxy::StoreTupleForTopKFinish,
{sorter_ptr, codegen.Const64(top_k)});
}
示例5: Append
void BufferAccessor::Append(CodeGen &codegen, llvm::Value *buffer_ptr,
const std::vector<codegen::Value> &tuple) const {
auto *size = codegen.Const32(storage_format_.GetStorageSize());
auto *space = codegen.Call(BufferProxy::Append, {buffer_ptr, size});
// Now, individually store the attributes of the tuple into the free space
UpdateableStorage::NullBitmap null_bitmap(codegen, storage_format_, space);
for (uint32_t col_id = 0; col_id < tuple.size(); col_id++) {
storage_format_.SetValue(codegen, space, col_id, tuple[col_id],
null_bitmap);
}
null_bitmap.WriteBack(codegen);
}
示例6: StoreTuple
void Sorter::StoreTuple(CodeGen &codegen, llvm::Value *sorter_ptr,
const std::vector<codegen::Value> &tuple) const {
// First, call Sorter::StoreInputTuple() to get a handle to a contiguous
// chunk of free space large enough to materialize a single tuple.
auto *space = codegen.Call(SorterProxy::StoreTuple, {sorter_ptr});
// Now, individually store the attributes of the tuple into the free space
UpdateableStorage::NullBitmap null_bitmap(codegen, storage_format_, space);
for (uint32_t col_id = 0; col_id < tuple.size(); col_id++) {
storage_format_.SetValue(codegen, space, col_id, tuple[col_id],
null_bitmap);
}
null_bitmap.WriteBack(codegen);
}
示例7:
//===----------------------------------------------------------------------===//
// Here, we discover the layout of every column that will be accessed. A
// column's layout includes three pieces of information:
//
// 1. The starting memory address (where the first value of the column is)
// 2. The stride length
// 3. Whether the column is in columnar layout
//===----------------------------------------------------------------------===//
std::vector<TileGroup::ColumnLayout> TileGroup::GetColumnLayouts(
CodeGen &codegen, llvm::Value *tile_group_ptr,
llvm::Value *column_layout_infos) const {
// Call RuntimeFunctions::GetTileGroupLayout()
uint32_t num_cols = schema_.GetColumnCount();
codegen.Call(
RuntimeFunctionsProxy::GetTileGroupLayout,
{tile_group_ptr, column_layout_infos, codegen.Const32(num_cols)});
// Collect <start, stride, is_columnar> triplets of all columns
std::vector<TileGroup::ColumnLayout> layouts;
auto *layout_type = ColumnLayoutInfoProxy::GetType(codegen);
for (uint32_t col_id = 0; col_id < num_cols; col_id++) {
auto *start = codegen->CreateLoad(codegen->CreateConstInBoundsGEP2_32(
layout_type, column_layout_infos, col_id, 0));
auto *stride = codegen->CreateLoad(codegen->CreateConstInBoundsGEP2_32(
layout_type, column_layout_infos, col_id, 1));
auto *columnar = codegen->CreateLoad(codegen->CreateConstInBoundsGEP2_32(
layout_type, column_layout_infos, col_id, 2));
layouts.push_back(ColumnLayout{col_id, start, stride, columnar});
}
return layouts;
}
示例8: Destroy
void BufferAccessor::Destroy(CodeGen &codegen, llvm::Value *buffer_ptr) const {
codegen.Call(BufferProxy::Destroy, {buffer_ptr});
}
示例9: Sort
void Sorter::Sort(CodeGen &codegen, llvm::Value *sorter_ptr) const {
codegen.Call(SorterProxy::Sort, {sorter_ptr});
}
示例10: Sort
// Just make a call to util::Sorter::Sort(...). This actually sorts the data
// that has been inserted into the sorter instance.
void Sorter::Sort(CodeGen &codegen, llvm::Value *sorter_ptr) const {
// auto *sort_func = SorterProxy::_Sort::GetFunction(codegen);
codegen.Call(SorterProxy::Sort, {sorter_ptr});
}