当前位置: 首页>>代码示例>>C++>>正文


C++ CodeGen::Call方法代码示例

本文整理汇总了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);
}
开发者ID:foche,项目名称:peloton,代码行数:15,代码来源:table_scan_translator.cpp

示例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)});
}
开发者ID:cmu-db,项目名称:peloton,代码行数:7,代码来源:sorter.cpp

示例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});
}
开发者ID:cmu-db,项目名称:peloton,代码行数:7,代码来源:sorter.cpp

示例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)});
}
开发者ID:cmu-db,项目名称:peloton,代码行数:19,代码来源:sorter.cpp

示例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);
}
开发者ID:apavlo,项目名称:peloton,代码行数:13,代码来源:buffer_accessor.cpp

示例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);
}
开发者ID:cmu-db,项目名称:peloton,代码行数:14,代码来源:sorter.cpp

示例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;
}
开发者ID:foche,项目名称:peloton,代码行数:31,代码来源:tile_group.cpp

示例8: Destroy

void BufferAccessor::Destroy(CodeGen &codegen, llvm::Value *buffer_ptr) const {
  codegen.Call(BufferProxy::Destroy, {buffer_ptr});
}
开发者ID:apavlo,项目名称:peloton,代码行数:3,代码来源:buffer_accessor.cpp

示例9: Sort

void Sorter::Sort(CodeGen &codegen, llvm::Value *sorter_ptr) const {
  codegen.Call(SorterProxy::Sort, {sorter_ptr});
}
开发者ID:cmu-db,项目名称:peloton,代码行数:3,代码来源:sorter.cpp

示例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});
}
开发者ID:camellyx,项目名称:peloton,代码行数:6,代码来源:sorter.cpp


注:本文中的CodeGen::Call方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。