similar to: Problem in using typedef with c++

Displaying 20 results from an estimated 60000 matches similar to: "Problem in using typedef with c++"

2006 May 08
1
Calling C++ code fom R --How to export C++ "unsigned" integer to R?
Hello all, Is there a way to export C++ "unsigned" integer to R? (I am trying to parse files in "BPMAP" format, and some variables are of type unsigned int (first declared in C++) ). I know that to export signed integer to R, I can do the following in C++: int Some_INTEGER = 5; int *p_myInt; SEXP myInt; PROTECT(myInt=NEW_INTEGER(1)); myInt[0] = Some_INTEGER;
2008 Mar 17
1
how to get access to C++ Objects
In the "Writing R Extensions" manual appears this example, to get access to C++ function using the R commands: R> dyn.load(paste("X", .Platform$dynlib.ext, sep = "")) constructor Y R> .C("X_main") constructor X destructor X list() That gives me access to the function "X_main", but how to get access to methods and properties
2004 Jun 09
1
About dll from c++ routine
Hi folks, My system is Windows98 + R1.9.0. The path for my system is c:\perl\bin; c:\mingw\bin; c:\rtools; c:\windows; c:\windows\command; c:\rw1090\bin. I created three files followed the examples in “Writing R extensions” in the directory c:\temp: // X.hh class X { public: X (); ~X (); }; class Y { public: Y (); ~Y (); }; // X.cc #include <iostream> #include "X.hh" static
2011 May 30
0
2D random walk with traps convert C++ code to R code
Hello, I have a C++ code for 2D random walks with traps and I want to convert it in a R code with its syntaxs, can anyone help??????? It's easy for me to adapt the body but I want help with the beginig (variable declaration) and th end exporting the output to a file ( like write.table() or sink() ) Thank you... #include <iostream> #include <math.h>#include
2006 Mar 13
1
Help on interfacing C++ with R
Hi, I am trying to set up a C++ library for my R code. I followed the R-extension manual but found out that the example of "X.cpp, X_main.cpp" is somewhat too simple. Here is my code: //lib4R.h testing for interfacing C++ with R -- using C++ library in R #include <iostream> using namespace std; class lib4R { public: lib4R(); ~lib4R(); int
1999 Feb 18
0
Loading C++ libraries
Some time ago, I asked on this list, if it is possible to use C++ libraries under R. In fact this seems to be very easy (at least under Redhat 5.2, egcs C++): e.g. Suppose we have a library R_main.cc: ------------------------------- #include "X.hh" extern "C" { void R_main () { X x; } } ------------------------------- X.hh ------------------------------- class X {
2011 May 30
2
[LLVMdev] Expressiveness of column numbers in dwarf using clang 3.0?
Hi all, I am processing DWARF line and column information in (x86 and ARM) executables in order to produce a mapping from the machine instructions back to the original source code (C/C++). Using the line numbers is quite straightforward ("libdwarf" [1] is doing the work me.) But when comparing the column numbers (extracted from the DWARF line table) with the corresponding source
2005 Apr 14
1
question about "R get vector from C"
Dear ALL-R helpers, I want to let R get vector from c ,for example :numeric array ,vector .I saw some exmple like this : /* useCall3.c */ /* Getting an integer vector from C using .Call */ #include <R.h> #include <Rdefines.h> SEXP setInt() { SEXP myint; int *p_myint; int len = 5; PROTECT(myint = NEW_INTEGER(len)); // Allocating
2016 Dec 01
2
Placement new and TBAA
On Sat, Nov 26, 2016 at 12:07 AM, Sanjoy Das <sanjoy at playingwithpointers.com > wrote: > So if you: > > 1. override operator delete to do nothing for that type (so that the > placement new actually has unfreed backing storage to re-use). > 2. have an empty destructor. > So, void *operator new(decltype(sizeof 0), void *) noexcept; struct MyInt { static void
2016 May 26
0
c++ programs type name changed in llvm ir after linking
Hi All, Recently I am using clang++ (3.8.0) to compile some c++ programs and find that some type names will be changed after linking different modules. Here is a simple example: I have two files: main.cpp and b.cpp main.cpp #include <iostream> using namespace std; class A { public: virtual void f() { cout << "A:\tf\n"; } }; int main () { A *p = new A;
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors... Each of these commands correctly prints "hello": echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit echo -e '#include <iostream>\nint main(){ std::cout <<
2011 Dec 13
1
[LLVMdev] Issues in converting C++ code to C using llvm and llc
Hello All, I came to know from a friend that using LLVM insfrastucture one can convert C++ programs to C. I needed this for my cross-compiler because we don't have support for C++ compilation in our cross-compiler. I tried following: http://llvm.org/docs/FAQ.html#translatecxx While I can generate .bc its llc which gives error. Then I also tried "clang" as oppose to llvm-g++. Here
2007 Apr 04
1
Accessing C++ code from R
Hi, I am trying to use existing C++ code from R. I have no problems compiling C code and using it in R, but with C++ I'm running into problems. Here's the compiler output: Macintosh-10:~/Desktop/dissertation/Model - CPP version/R labguest$ g++ -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 *.cpp In file included from
2012 Mar 22
2
Quicker way to apply values to a function
Hi all, myint=function(mu,sigma){ integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value } mymu=seq(-3,3,length(1000)) mysigma=seq(0,1,length(500))[-1] k=1 v=c() for (j in 1:length(mymu)) { for (i in 1:length(mysigma)) { v[k]=myint(mymu[j],mysigma[i]) k=k+1 } } Basically, I want to investigate for what values of mu and sigma, the integral is divergent. Is there another way
2008 Oct 31
0
R help for invoking nmmin()
My code is as follows: #include <iostream> #include <cmath> using namespace std; #define MATHLIB_STANDALONE 1 extern "C" { #include "R_ext/Applic.h" } typedef struct TT{ double ** tempX; double * tempY; int tempN; } TT, *MM; double fn(int N, double * beta, void * ex){ double total = 0; int i = 0,j = 0; double * betaFn = new double[N]; MM tmp = (MM)ex;
2010 May 12
2
[LLVMdev] New libc++ LLVM Subproject
On May 11, 2010, at 7:26 PM, David Greene wrote: > On Tuesday 11 May 2010 15:43:21 Chris Lattner wrote: >> Hi All, >> >> LLVM now includes a C++ standard library, written by Howard Hinnant. You >> can read about it here: >> http://blog.llvm.org/2010/05/new-libc-c-standard-library.html >> >> Or get the code here: >> svn co
2011 May 31
0
[LLVMdev] Expressiveness of column numbers in dwarf using clang 3.0?
On May 30, 2011, at 11:11 AM, trash-stuff at gmx.de wrote: > Hi all, > > I am processing DWARF line and column information in (x86 and ARM) executables in order to produce a mapping from the machine instructions back to the original source code (C/C++). Using the line numbers is quite straightforward ("libdwarf" [1] is doing the work me.) But when comparing the column numbers
2012 Mar 23
1
Vectorize (scalar) function
Hi all, myint=function(mu,sigma){ integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value } x=seq(0,50,length=3000) x=x[-1] plot(x,myint(4,x)) # not working yet I think I have to 'Vectorize' it somehow? What's a scalar function? and a primitive function? Thanks. casper ----- ################################################### PhD candidate in Statistics School
2006 Nov 20
0
[LLVMdev] libstdc++ as bytecode, and compiling C++ to C
On Mon, 2006-11-20 at 17:49 +1100, Emil Mikulic wrote: > I've compiled all the object files that make up libstdc++ and libsupc++ > into LLVM bytecode: > http://goanna.cs.rmit.edu.au/~emil/libstdcxx.tar.bz2 (438KB) > > A simple test program, x.cpp: > > #include <iostream> > int main() { std::cout << "hello world\n"; return 0; } > > $
2013 Mar 11
0
[LLVMdev] YAML IO problems
I'm trying to parse a simple JSON file, and am having problems with using YAMLIO. FWIW, I see the unit test YAMLIOTest.cpp is disabled with a #if 0. Anyway, the JSON file yaml.json contains: { "bool_test": true, "directory": ".", "suffix": "_test", "int_test": 4 } The test program when run shows: YAML:5:15: error: invalid