search for: extvalu

Displaying 3 results from an estimated 3 matches for "extvalu".

Did you mean: extvalue
2011 Oct 31
1
Question about copying reference objects using the initialize method
...= 2 copyObject = newObject$copy() copyObject$value = 3 print(newObject$value) print(copyObject$value) 2) However, if the initialize method has arguments, I get an error: myClass = setRefClass("myClass", fields = list(value = "numeric") ) myClass$methods(initialize = function(extValue, ...){ ? value <<- extValue ? callSuper(...) }) newObject = myClass$new(extValue = 2) copyObject = newObject$copy() Error in .Object$initialize(...) : argument "extValue" is missing, with no default I understand that copy() first builds another instance of the object and the...
2011 Mar 28
0
[LLVMdev] array index access
...dex. p->getOperand(3) will return %N as an llvm::Value(). Then you can use dyn_cast<llvm::ConstantInt> to see if it's a ConstantInt as opposed to a run-time variable (or some other flavor of constant like a ConstantExpr), and then you can pull the value out using getValue() or get{Z,S}ExtValue(). > I want to get that index so I can insert a check to see if it violates the > array bounds. > So the final code (in pseudocode) will look like, > %N = load i32* %k, align 4 > if( 0 <= %N < array-size){ >  %p = getelementptr inbounds [10 x [20 x i32]]* %3, i32 0, i32 %M...
2011 Mar 28
2
[LLVMdev] array index access
Oh I see what you mean but I don't think that is the value that I want. In the code, I know that %N = load i32* %k, align 4 %p = getelementptr inbounds [10 x [20 x i32]]* %3, i32 0, i32 %M, i32 %N So I analyze the GEP and know that %N is a pointer to an int32, which is the array index. I want to get that index so I can insert a check to see if it violates the array bounds. So the final code