Displaying 20 results from an estimated 22 matches for "rf_protect".
2006 Feb 08
1
Rf_protect in Rinternals.h
Hello!
I'd like to ask you a question about c (macros):
In Rinternals.h are defined:
a) SEXP Rf_protect(SEXP);
b) #define protect Rf_protect
c) #define PROTECT(s) protect(s)
As far as I understand the calls Rf_protect( x ), protect( x ) and
PROTECT( x ) are all equalent.
So whats the reason that there are 2 macros defined? Why 3 times the
same when 1 distinct function would be enough?
Thanks f...
2010 May 06
1
R on kdeedu-svn library problem
...keFiles/cantor_rserver.dir/rserver.o: In function
`RServer::runCommand(QString const&, bool)':
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp:223: undefined
reference to `Rf_allocVector'
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp:223: undefined
reference to `Rf_protect'
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp:224: undefined
reference to `Rf_mkChar'
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp:224: undefined
reference to `SET_STRING_ELT'
$SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp:226: undefined
reference...
2010 Aug 23
1
Speed improvement to PROTECT, UNPROTECT, etc.
...s like an obvious target for optimization. Indeed, I've
found that one can speed up the interpreter by about 10% by just
changing these.
The functions are actually macros defined in Rinternals.h, but end up
just calling functions defined in memory.c (apparently as protect,
etc., but really as Rf_protect, etc.). So there is function call
overhead every time they are used.
To get rid of the function call overhead, without generating lots of
extra code, one can redefine the macros to handled to the common case
inline, and call the function in memory.c for the uncommon cases (eg,
error on stack unde...
2004 Feb 17
2
interfacing C++ using .Call
...ference to
`Rf_isFunction(SEXPREC*)'
test.a(test.o.b)(.text+0x99):test.cpp: undefined reference to
`Rf_isEnvironment(SEXPREC*)'
test.a(test.o.b)(.text+0xb7):test.cpp: undefined reference to
`Rf_lang2(SEXPREC*, SEXPREC*)'
test.a(test.o.b)(.text+0xc2):test.cpp: undefined reference to
`Rf_protect(SEXPREC*)'
test.a(test.o.b)(.text+0xcf):test.cpp: undefined reference to
`Rf_allocVector(unsigned, int)'
test.a(test.o.b)(.text+0xda):test.cpp: undefined reference to
`Rf_protect(SEXPREC*)'
test.a(test.o.b)(.text+0xf5):test.cpp: undefined reference to
`Rf_getAttrib(SEXPREC*, SEXPREC*...
2006 Nov 27
1
R.DLL mapping by P/Invoke
...mport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern IntPtr Rf_mkString(string toConvert);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern IntPtr Rf_protect(IntPtr ptr);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void Rf_unprotect(int l);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static...
2004 Feb 17
1
RCMD SHLIB == Couldn't reserve space for cygwin's heap, Win32 ?
...pointer type
flikam.c:426: warning: passing arg 1 of `Rf_length' from incompatible
pointer type
flikam.c:428: warning: passing arg 1 of `Rf_coerceVector' from incompatible
pointer type
flikam.c:428: warning: assignment from incompatible pointer type
flikam.c:428: warning: passing arg 1 of `Rf_protect' from incompatible
pointer type
flikam.c:429: warning: passing arg 1 of `Rf_coerceVector' from incompatible
pointer type
flikam.c:429: warning: assignment from incompatible pointer type
flikam.c:429: warning: passing arg 1 of `Rf_protect' from incompatible
pointer type
flikam.c:430: war...
2004 Feb 17
1
RCMD SHLIB == Couldn't reserve space for cygwin's heap, Win32 ?
...pointer type
flikam.c:426: warning: passing arg 1 of `Rf_length' from incompatible
pointer type
flikam.c:428: warning: passing arg 1 of `Rf_coerceVector' from incompatible
pointer type
flikam.c:428: warning: assignment from incompatible pointer type
flikam.c:428: warning: passing arg 1 of `Rf_protect' from incompatible
pointer type
flikam.c:429: warning: passing arg 1 of `Rf_coerceVector' from incompatible
pointer type
flikam.c:429: warning: assignment from incompatible pointer type
flikam.c:429: warning: passing arg 1 of `Rf_protect' from incompatible
pointer type
flikam.c:430: war...
2004 Jun 16
1
Compiling C++ package source: linking problem?
...tever (SEXP model)
{
SEXP anotherModel;
PROTECT(anotherModel = NEW_NUMERIC(4));
UNPROTECT(1);
return anotherModel;
}
An example of compiler feedback from R CMD SHLIB (I have mingw 3.1.0):
...: undefined reference to 'Rf_allocVector(unsigned,int)'
...: undefined reference to 'Rf_protect(SEXPREC*)'
...: undefined reference to 'Rf_unprotect(int)'
Can anybody tell me what the matter is? Did I miss something?
My PATH variable is as follows:
C:\R\tools;C:\Perl\bin\;C:\mingw\bin;c:\R\rw1090\bin;C:\Program
Files\MiKTeX\miktex\bin;...;C:\Program Files\HTML Help Workshop
I...
2007 Oct 17
0
Using R.dll in .NET IPC
...mport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern IntPtr Rf_mkString(string toConvert);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern IntPtr Rf_protect(IntPtr ptr);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static extern void Rf_unprotect(int l);
[DllImport("R.DLL", /*CallingConvention = CallingConvention.Cdecl,*/ CharSet = CharSet.Ansi)]
static...
2009 Nov 13
0
Problem building R 2.10 release
...able when I declare
export CC=gcc
However, I encountered another problem during make. I think it is because I
built the lapack libraries using intel compilers.
sparseQR.o: In function `sparseQR_coef':
sparseQR.c:(.text+0x52a): undefined reference to `Rf_protect'
sparseQR.c:(.text+0x53a): undefined reference to `Rf_install'
sparseQR.c:(.text+0x54f): undefined reference to `R_do_slot'
sparseQR.c:(.text+0x55f): undefined reference to `Rf_install'
sparseQR...
2010 Jan 02
3
R-devel Digest, Vol 83, Issue 2
...We are now using [2] R_PreserveObject and R_ReleaseObject to manage
> garbage collection instead of the PROTECT/UNPROTECT dance. This seems to
> work well, but I was wondering if there was documentation about it.
The most precise technical documentation is in memory.c
PROTECT is an alias for Rf_protect, itself an alias for
SEXP protect(SEXP s);
and uses a stack (R_PPStack) to store protected objects.
> In particular, if we preserve the same SEXP twice (or more), should we
> implement some sort of reference counting ?
This depends on the requirements for your system.
For example, in rpy2...
2003 Sep 05
2
stack overflow
Hello,
I am trying to do an ANOVA on a microarray data set consisting of
22690 elements. The ANOVA is fine, but when I try to put the data in
a frame in order to exporting it, I get a stack overflow. I have
found documentation on dynamic memory in R, but not on how to increase
the stack size. The code I'm using is below. If anyone has any
suggestions for a workaround here, I'd
2002 Jan 02
1
Building R-1.4 on Tru64
...Tru64 (I'll enclose the
text from bug.report() from R-1.3.1 at the end.) The relevant part of
the log is below.
Any ideas?
gcc -shared -o methods.so do_substitute_direct.o
methods_list_dispatch.o method_meta_data.o slot.o -L/usr/local/lib
/usr/ucb/ld:
Warning: Unresolved:
TYPEOF
Rf_error
Rf_protect
Rf_substitute
Rf_unprotect
Rf_duplicate
Rf_VectorToPairList
R_NilValue
Rf_NewEnvironment
R_set_standardGeneric_ptr
R_GlobalEnv
R_set_quick_method_check
Rf_install
Rf_allocVector
LOGICAL
R_PreserveObject
Rf_mkChar
SET_STRING_ELT
Rf_findVar
R_UnboundValue
VECTOR_ELT
R_NamesSymbol
Rf_getAttrib
Rf_leng...
2002 Jan 17
1
MKL seems to beat ATLAS, but some problems... (was RE: li nkin g R against MKL)
...Vector (./lapack.so)
undefined symbol: R_CHAR (./lapack.so)
undefined symbol: Rf_unprotect_ptr (./lapack.so)
undefined symbol: SET_VECTOR_ELT (./lapack.so)
undefined symbol: Rf_isMatrix (./lapack.so)
undefined symbol: R_setLapackRoutines (./lapack.so)
undefined symbol: Rf_protect (./lapack.so)
undefined symbol: VECTOR_ELT (./lapack.so)
undefined symbol: Rf_asLogical (./lapack.so)
undefined symbol: COMPLEX (./lapack.so)
undefined symbol: Rf_unprotect (./lapack.so)
undefined symbol: REAL (./lapack.so)
undefined symbol: INTEGER (./lapack.so)
undefined symb...
2002 Jan 17
1
MKL seems to beat ATLAS, but some problems... (was RE: li nkin g R against MKL)
...Vector (./lapack.so)
undefined symbol: R_CHAR (./lapack.so)
undefined symbol: Rf_unprotect_ptr (./lapack.so)
undefined symbol: SET_VECTOR_ELT (./lapack.so)
undefined symbol: Rf_isMatrix (./lapack.so)
undefined symbol: R_setLapackRoutines (./lapack.so)
undefined symbol: Rf_protect (./lapack.so)
undefined symbol: VECTOR_ELT (./lapack.so)
undefined symbol: Rf_asLogical (./lapack.so)
undefined symbol: COMPLEX (./lapack.so)
undefined symbol: Rf_unprotect (./lapack.so)
undefined symbol: REAL (./lapack.so)
undefined symbol: INTEGER (./lapack.so)
undefined symb...
2004 Mar 13
0
64bit build on IBM
...711-317 ERROR: Undefined symbol: .Rf_duplicate
ld: 0711-317 ERROR: Undefined symbol: .R_ProtectWithIndex
ld: 0711-317 ERROR: Undefined symbol: R_NamesSymbol
ld: 0711-317 ERROR: Undefined symbol: .Rf_getAttrib
ld: 0711-317 ERROR: Undefined symbol: .Rf_errorcall
ld: 0711-317 ERROR: Undefined symbol: .Rf_protect
ld: 0711-317 ERROR: Undefined symbol: .Rf_str2type
ld: 0711-317 ERROR: Undefined symbol: .Rf_begincontext
ld: 0711-317 ERROR: Undefined symbol: .Rf_endcontext
ld: 0711-317 ERROR: Undefined symbol: .Rf_setAttrib
ld: 0711-317 ERROR: Undefined symbol: .Rf_unprotect
ld: 0711-317 ERROR: Undefined symbol...
2007 Feb 25
3
R/C++/memory leaks
Dear all,
I have wrapped a C++ function in an R package. I allocate/deallocate
memory using C++ 'new' and 'delete'. In order to allow user
interrupts without memory leaks I've moved all the delete statements
required after an interrupt to a separate C++ function freeMemory(),
which is called using on.exit() just before the .C() call.
I am concerned about the
2005 Apr 12
5
How allocate STRSXP outside of gc
Hi,
I am trying to figure a way to allocate a string SEXP so that gc() won't
ever collect it.
Here is a little bit of a background. Suppose I want to write a
.Call-callable function that upon each call returns the same value, say
mkChar("foo"):
SEXP getFoo() {
return mkChar("foo");
}
The above implementation doesn't take advantage of the fact that
2008 May 07
1
[BioC] RCurl loading problem with 64 bit linux distribution
...f_asInteger
U Rf_error
U Rf_eval
U Rf_getAttrib
U Rf_install
U Rf_length
U Rf_mkChar
U Rf_mkCharCE
U Rf_mkCharLen
U Rf_mkString
U Rf_protect
U Rf_setAttrib
U Rf_unprotect
U Rf_warning
U SETCAR
U SET_STRING_ELT
U SET_VECTOR_ELT
U STRING_ELT
U TYPEOF
U VECTOR_ELT
0000000000208040 d Versio...
2008 May 07
1
[BioC] RCurl loading problem with 64 bit linux distribution
...f_asInteger
U Rf_error
U Rf_eval
U Rf_getAttrib
U Rf_install
U Rf_length
U Rf_mkChar
U Rf_mkCharCE
U Rf_mkCharLen
U Rf_mkString
U Rf_protect
U Rf_setAttrib
U Rf_unprotect
U Rf_warning
U SETCAR
U SET_STRING_ELT
U SET_VECTOR_ELT
U STRING_ELT
U TYPEOF
U VECTOR_ELT
0000000000208040 d Versio...