search for: printvalue

Displaying 20 results from an estimated 32 matches for "printvalue".

2011 Oct 28
2
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
Hi all. I found next code when switch instruction differs: Engine.logf("right switch has extra case %r") << CaseValue; Where CaseValue is a ConstantInt object. Looking how logf works I found that it invokes DiffConsumer::printValue method for CaseValue. And here I found that CaseValue itself will never printed. On first look how DiffConsumer::printValue works it seems that for all constants "object numbering" should be printed: out << '%' << ctxt.RNumbering[V]; // V = CaseValue in our case....
2011 Oct 31
3
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
...atkovskiy wrote: >> I found next code when switch instruction differs: >> >> Engine.logf("right switch has extra case %r")<< CaseValue; >> >> Where CaseValue is a ConstantInt object. Looking how logf works I found >> that it invokes DiffConsumer::printValue method for CaseValue. And here >> I found that CaseValue itself will never printed. On first look how >> DiffConsumer::printValue works it seems that for all constants "object >> numbering" should be printed: >> >> out<< '%'<< ctxt.RNumb...
2011 Oct 29
0
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
...at 2:00 AM, Stepan Dyatkovskiy wrote: > I found next code when switch instruction differs: > > Engine.logf("right switch has extra case %r") << CaseValue; > > Where CaseValue is a ConstantInt object. Looking how logf works I found > that it invokes DiffConsumer::printValue method for CaseValue. And here > I found that CaseValue itself will never printed. On first look how > DiffConsumer::printValue works it seems that for all constants "object > numbering" should be printed: > > out << '%' << ctxt.RNumbering[V]; // V =...
2011 Nov 03
0
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
...t;> I found next code when switch instruction differs: >>> >>> Engine.logf("right switch has extra case %r")<< CaseValue; >>> >>> Where CaseValue is a ConstantInt object. Looking how logf works I found >>> that it invokes DiffConsumer::printValue method for CaseValue. And here >>> I found that CaseValue itself will never printed. On first look how >>> DiffConsumer::printValue works it seems that for all constants "object >>> numbering" should be printed: >>> >>> out<< '%'&...
2003 Feb 02
1
printing reals from C with digits -- once more
...m different real vectors with different digits option. This is quite a possible with Rprintf() but that one supprots printing format as C does, not in R native way (setting digits=7 or printing with "%12.7f" are two quite different things). So I would like to find something more R-ish. PrintValue() seems promising (it understands when I change options(digits) but I did not get it to print a single value. I tried SEXP variable; PrintValue(VECTOR_ELT(variable, i)); which lead to crash, while PrintValue(variable); prints the whole vector. StringFromReal() (and printing as CHAR) i...
2009 Feb 22
4
'unique' error message is printed despite silent=TRUE (PR#13547)
In 2.8.0/Windows Vista: When 'unique' gives a type error message, it prints out even if errors are being caught: > try(unique(quote(hello)),silent=TRUE) hello This comes from the .Internal unique routine: > try(.Internal(unique(quote(hello),NULL,NULL)),silent=TRUE) hello I guess it is using the internal equivalent of print rather than the internal equivalent of stop.
2000 Jun 21
1
Port of R header files to Delphi
...Syntax errors are causing my rterm to shut down, apparently because I'm not catching the exceptions that are thrown. How are exceptions thrown? 2. If I want to get R to give me a string showing how an existing variable would be printed, what's the normal procedure? I tried calling "PrintValue", passing it the Rinternals export "R_LastvalueSymbol", but I just get an access violation in R.DLL. This could be because I'm not handling the export properly (DLLs normally export entry points, not pointers to variables, so I had to try to guess what indirection was being used...
2008 May 06
3
a R_PV problem
...to show the content of SEXP variables: SEXP sexp; // it is a data.frame SEXP colNames = getAttrib(sexp, R_NameSymbol); A strange thing is that after halting the program: (gdb) p R_PV(colNames) does not show the content of colNames. I am positive my code is right because if I insert "PrintValue(colNames);" in the c code, it will print the right value. My debug result shows that the variable "colNames" failed the "isObject" call. I am not sure whether this is a new feature or bug. Anyone can help? Thanks, Gang Liang
2008 Mar 19
1
R_ParseVector problem: it's cutting off after the decimal point
Dear all, my aim is to integrate R in an interactive visualisation software called Bulk Analyzer developed by VrVis (http://www.vrvis.at). the code: SEXP e, tmp; ParseStatus status; PROTECT(tmp = mkString("x <- c(1.234,-3.45)")); PrintValue(tmp); PROTECT(e = R_ParseVector(tmp, -1, &status, R_NilValue)); PrintValue(e); UNPROTECT(2); produces the following output: [1] "x <- c(1.234,-3.45)" expression(x <- c(1, -3)) I'm using MS Visual C++. The code works fine in a small test project with the same R startup s...
2010 Jul 19
4
[LLVMdev] Is va_arg deprecated?
...y variadic function does not generate any va_arg instruction. Is va_arg deprecated? Will va_arg instruction ever be generated by any front-end? The source code and llvm instructions are appended as follows. the c code #include<stdarg.h> #include<stdio.h> #include<stdlib.h> void printValue(char * fmt, ...) { va_list args; va_start(args, fmt); int i; double d; i = va_arg(args, int); d = va_arg(args, double); va_end(args); } the generated llvm instructions: ; ModuleID = 'i.bc' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:...
2010 Jul 19
0
[LLVMdev] Is va_arg deprecated?
...a_arg instruction. > Is va_arg deprecated? Will va_arg instruction ever be generated by any > front-end?  The source code and llvm instructions are appended as follows. > > the c code > #include<stdarg.h> > #include<stdio.h> > #include<stdlib.h> > > void printValue(char * fmt, ...) { >   va_list args; >   va_start(args, fmt); >   int i; >   double d; >   i = va_arg(args, int); >   d = va_arg(args, double); >   va_end(args); > } > > the generated llvm instructions: > ; ModuleID = 'i.bc' > target datalayout = > &qu...
2019 Apr 05
2
Parsing code with newlines
...SEXP e, tmp; int hadError; ParseStatus status; init_R(argc, argv); PROTECT(tmp = mkString("\n\r ls()")); PROTECT(e = R_ParseVector(tmp, 1, &status, R_NilValue)); if (status != PARSE_OK) { printf("boo boo\n"); } else { PrintValue(e); R_tryEval(VECTOR_ELT(e,0), R_GlobalEnv, &hadError); } UNPROTECT(2); end_R(); return(0); } -- Mikhail
2003 Jan 29
1
printing reals from C with digits
Hi, I want to print real numbers in C code with different values for digits. How to do that? As I have understood, what I should do is to call StringFromReal() which calls FormatReal(), that one suggests the parameters (width, decimal places and exponential form). FormatReal() includes eps = pow(10.0, -(double)R_print.digits); So I guess I have to change the value of R_print.digits.
2012 Aug 18
1
[LLVMdev] GlobalVariable initializer using from beyond the grave
...ule.global_end(); gi != ge; ++gi) { GlobalVariable *global_var = dyn_cast<GlobalVariable>(gi); if (global_var->use_empty()) { log->Printf("Did remove %s", PrintValue(global_var).c_str()); global_var->eraseFromParent(); erased = true; break; } } } It's not super efficient and it falls over in the face of cycles, but that's not what I'm running into. Rather, Constants inside...
2010 Jan 23
1
matrix to a C function
Hi the list, Is there a way to give a matrix to a C function, and then to use it as a matrix ? I write a function to print a matrix, but I use it as a vector : 1. void printMatrix(double *mTraj,int *nbCol, int *nbLigne){ 2. int i=0,j=0; 3. for(i=0 ; i < *nbLigne ; i++){ 4. for(j=0 ; j < *nbCol ; j++){ 5. Rprintf(" %f",mTraj[i * *nbCol + j]); 6. } 7.
2009 May 19
2
About " Error: C stack usage is too close to the limit"
...s_thread(){ SEXP e, tmp; int hadError; int argc = 0; char *argv[1]; ParseStatus status; init_R(argc, argv); PROTECT(tmp = mkString("{print(lh)}")); PROTECT(e = R_ParseVector(tmp, 1, &status, R_NilValue)); PrintValue(e); R_tryEval(VECTOR_ELT(e,0), R_GlobalEnv, &hadError); UNPROTECT(2); end_R(); } int main(int argc, char *argv[]){ pthread_t th1; int iret1; iret1 = pthread_create(&th1, NULL, ts_thread,NULL); pthread_join(th1, NULL); printf("Thre...
2008 Apr 29
2
Calling R from C - part way there but need a push!
Dear All, I've read the manual on "Writing R Extensions" and in particular the part on calling R from C. (Most of the manual is about calling C from R, not the other way around.) The good news is that I can now call _some_ R from C, specifically the R functions which have C header files. However it isn't clear to me how to call R functions that are written in R. I
2007 Apr 07
2
Rf_PrintValue problem with methods::show
Hi, I think this is a bug (even though I can't find documentation explicitly saying that it should work). Basically, Rf_PrintValue(obj) fails when 'obj' is an S4 object that should be printed using show() rather than print(). From the error message I'm guessing that the need to use show is detected correctly but then show is not found. "cbind2" in the code below is just a representative object, the same...
2019 Apr 10
0
Parsing code with newlines
...init_R(argc, argv); > > PROTECT(tmp = mkString("\n\r ls()")); > PROTECT(e = R_ParseVector(tmp, 1, &status, R_NilValue)); > if (status != PARSE_OK) > { > printf("boo boo\n"); > } > else > { > PrintValue(e); > R_tryEval(VECTOR_ELT(e,0), R_GlobalEnv, &hadError); > } > UNPROTECT(2); > > end_R(); > return(0); > } > > > -- > Mikhail > > ______________________________________________ > R-devel at r-project.org mailing list > h...
1998 Apr 03
1
R-beta: f2c with R61.2
A non-text attachment was scrubbed... Name: not available Type: text Size: 750 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/19980403/5ef52eac/attachment.pl