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

Method GetDataReference

cpp/src/gandiva/llvm_generator.cc:197–210  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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