本文整理汇总了C++中CodeGen::CallFunc方法的典型用法代码示例。如果您正苦于以下问题:C++ CodeGen::CallFunc方法的具体用法?C++ CodeGen::CallFunc怎么用?C++ CodeGen::CallFunc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeGen
的用法示例。
在下文中一共展示了CodeGen::CallFunc方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void TableScanTranslator::ScanConsumer::FilterRowsByVisibility(
CodeGen &codegen, llvm::Value *tid_start, llvm::Value *tid_end,
Vector &selection_vector) const {
// Get the pointer to TransactionRuntime::PerformRead(...)
auto *txn_perform_read =
TransactionRuntimeProxy::_PerformVectorizedRead::GetFunction(codegen);
llvm::Value *txn = translator_.GetCompilationContext().GetTransactionPtr();
llvm::Value *raw_sel_vec = selection_vector.GetVectorPtr();
// Invoke the function
llvm::Value *out_idx =
codegen.CallFunc(txn_perform_read,
{txn, tile_group_ptr_, tid_start, tid_end, raw_sel_vec});
selection_vector.SetNumElements(out_idx);
}
示例2: Append
// Append the given tuple into the sorter instance
void Sorter::Append(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 *store_func = SorterProxy::_StoreInputTuple::GetFunction(codegen);
auto *space = codegen.CallFunc(store_func, {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++) {
if (!null_bitmap.IsNullable(col_id)) {
storage_format_.SetValueSkipNull(codegen, space, col_id, tuple[col_id]);
} else {
storage_format_.SetValue(codegen, space, col_id, tuple[col_id],
null_bitmap);
}
}
null_bitmap.WriteBack(codegen);
}
示例3: 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.CallFunc(sort_func, {sorter_ptr});
}
示例4: Init
// Just make a call to util::Sorter::Init(...)
void Sorter::Init(CodeGen &codegen, llvm::Value *sorter_ptr,
llvm::Value *comparison_func) const {
auto *tuple_size = codegen.Const32(storage_format_.GetStorageSize());
codegen.CallFunc(SorterProxy::_Init::GetFunction(codegen),
{sorter_ptr, comparison_func, tuple_size});
}
示例5: Destroy
// Just make a call to util::Sorter::Destroy(...)
void Sorter::Destroy(CodeGen &codegen, llvm::Value *sorter_ptr) const {
codegen.CallFunc(SorterProxy::_Destroy::GetFunction(codegen), {sorter_ptr});
}