MCPcopy Create free account
hub / github.com/apache/arrow / GetDataReference

Method GetDataReference

cpp/src/gandiva/llvm_generator.cc:198–211  ·  view source on GitHub ↗

Get reference to data array at specified index in the args list.

Source from the content-addressed store, hash-verified

196
197/// Get reference to data array at specified index in the args list.
198llvm::Value* LLVMGenerator::GetDataReference(llvm::Value* arg_addrs, int idx,
199 FieldPtr field) {
200 const std::string& name = field->name();
201 llvm::Value* load = LoadVectorAtIndex(arg_addrs, types()->i64_type(), idx, name);
202 llvm::Type* base_type = types()->DataVecType(field->type());
203 llvm::Value* ret;
204 if (base_type->isPointerTy()) {
205 ret = ir_builder()->CreateIntToPtr(load, base_type, name + "_darray");
206 } else {
207 llvm::Type* pointer_type = types()->ptr_type(base_type);
208 ret = ir_builder()->CreateIntToPtr(load, pointer_type, name + "_darray");
209 }
210 return ret;
211}
212
213/// Get reference to offsets array at specified index in the args list.
214llvm::Value* LLVMGenerator::GetOffsetsReference(llvm::Value* arg_addrs, int idx,

Callers 1

GetBufferReferenceMethod · 0.80

Calls 4

typesFunction · 0.70
ir_builderFunction · 0.70
nameMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected