Displaying 2 results from an estimated 2 matches for "mul_typ".
Did you mean:
mul_type
2008 Jan 04
7
[LLVMdev] Calling functions across modules. And those pesky vectors!
...nd I don't understand the error. I made a
simple function which was just supposed to multiply two 3 component
float vectors and return the result:
//Snip on:
VectorType *vType = VectorType::get(Type::FloatTy, 3);
std::vector<const Type*> Vectors(2, vType);
FunctionType *mul_type = FunctionType::get(vType, Vectors, false);
Function* mul = new Function(mul_type,
Function::ExternalLinkage, "mul", mod);
mul->setCallingConv(CallingConv::C);
Function::arg_iterator args = mul->arg_begin();
Value* x = args++;
x->setName...
2008 Jan 04
0
[LLVMdev] Vectors and function calls across modules
...a simple
function which takes in 2 vectors, multiplies them, and returns the
result. Here's the relevant code for making the function ("mul"):
//Code snip start
VectorType *vType = VectorType::get(Type::FloatTy, 3);
std::vector<const Type*> Vectors(2, vType);
FunctionType *mul_type = FunctionType::get(vType, Vectors, false);
Function* mul = new Function(mul_type,
Function::ExternalLinkage, "mul", mod);
mul->setCallingConv(CallingConv::C);
Function::arg_iterator args = mul->arg_begin();
Value* x = args++;
x->setName("x");
Value*...