Displaying 20 results from an estimated 100 matches similar to: "Callbacks seems to get GCed."
2008 Aug 04
2
Parsing code with newlines
Dear List,
When I try to parse code containing newline characters with R_ParseVector, I
get a compilation error. How can I compile code that includes comments and
newlines?
I am using the following:
void* my_compile(char *code)
{
SEXP cmdSexp, cmdExpr = R_NilValue;
ParseStatus status;
PROTECT (cmdSexp = allocVector (STRSXP, 1));
SET_STRING_ELT (cmdSexp, 0, mkChar (code));
2009 Sep 03
1
Running an expression 1MN times using embedded R
Hello,
I'm evaluating this expression
expression({ for(x in 1:5){ .Call('rh_status','x') }})
a million times from a program with R embedded in it. I have attached
reproducible code that crashes with
Program received signal SIGSEGV, Segmentation fault.
0x00002b499ca40a6e in R_gc_internal (size_needed=0) at memory.c:1309
1309 FORWARD_NODE(R_PPStack[i]);
Current language:
2012 Feb 01
3
Crash in R using embedded.
Hi,
I'm new to R, and am trying to embed R into another application.
I'm calling gev.fit() from the ismev package, and it is crashing somewhere
inside it.
gdb is not catching it, and valgrind is not showing any memory corruption
issues.
I suspect it's memory corruption, because it doesn't crash in exactly the
same spot each time.
I'm running R 2.12.2 on a 64 bit linux (Ubuntu
2013 Oct 16
1
Parallel R expression evaluations
Hi all,
I am using R-3.0.1 under Linux platform to embed R into my C++ code.
I am facing an error while executing more than 1 R-expressions parallelly.
I am executing round(X) and abs(X) parallelly on a set of 50 input rows
which resulted in segmentation fault after getting the following errors.
Error: unprotect_ptr: pointer not found
Error: argument to 'findVar' is not an environment
2008 Jul 18
0
Rcpp from C++
Hi Sri,
I haven't really elaborated on it having other stuff to prepare first, but as
far as I got you first assign data to a vector:
#include <R.h>
#include <Rinternals.h>
#undef R_INTERFACE_PTRS
#include <Rembedded.h>
#include "Rcpp.hpp"
#include <R_ext/Parse.h>
#include <Rinternals.h>
#include <Rdefines.h>
//assigning a vector
SEXP
2008 Sep 03
8
suggestion of new API function for embedded programming.
While doing some embedded programming and trying to figure out how to generate
a hand coded SEXP equivalent of the line
"t.test(x,conf.level=(1-p))$conf.int[2]" I had an idea for an addition to the
embedded API.
There are a number of hidden or static parse functions (R_ParseBuffer,
R_Parse1Buffer, etc.) which take an IoBuffer* and returns a parsed tree. If
one or more of these
2009 Sep 07
1
Usage of OCaml/R binding.
Hello.
I've been pulling together a Debian package out of Maxence Guesdon's
OCaml bindings for R. Will be available from my website as soon as I get
my router to obey me. Here's Maxence's bindings:
http://pauillac.inria.fr/~guesdon/ocaml-r.en.html
The purpose of this software is to access R from OCaml programs.
However, my issue is that after having pulled things to a Debian
2009 Sep 07
1
Usage of OCaml/R binding.
Hello.
I've been pulling together a Debian package out of Maxence Guesdon's
OCaml bindings for R. Will be available from my website as soon as I get
my router to obey me. Here's Maxence's bindings:
http://pauillac.inria.fr/~guesdon/ocaml-r.en.html
The purpose of this software is to access R from OCaml programs.
However, my issue is that after having pulled things to a Debian
2013 Nov 01
4
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
Hello,
I would like to have your opinions on this.
*Problem:*
Currently, there are no ways to perform hypercalls into LLVM (they transfer
execution from the program being executed to the LLVM infrastructure to
perform compilation). The goal of this project is to cleanly integrate an
API into the LLVM code/execution engine to create custom callbacks. The
“lli” executable should allow having a
2008 Jan 02
1
setting the seed in standalone code using Rlib
Hi,
Is the below -- setSeed -- an okay way to set the seed in standalone
applications making use of Rlib? It seems to work as expected. Is
there a better way to do it? (I'm also looking at do_setseed but am
unsure what to supply as op. findFun("set.seed", R_GlobalEnv)?) Thanks
much.
--
David Faden, dfaden at iastate.edu
AIM: pitulx
--
#include <assert.h>
#include
2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
When I used -std-compile-opts -disable-inlining, my transform didn't
happen. I think in your test, the inline of UseCallback into foo
automatically made the function pointer into a constant, which turned
it into a direct call that was then inlined.
If UseCallback is too big to inline and uses the callback parameter
inside a loop, this transform is potentially valuable, particularly if
2008 Feb 04
8
AGI: Not getting answers from get_data in a call-file call
I have the following situation: I drop a call-file into the Asterisk
spool directory and I get called back. That all works.
And I have this script:
#!/usr/bin/perl -w
use Asterisk::AGI;
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$AGI->answer();
my $i;
$i = $AGI->channel_status();
$AGI->say_digits($i);
$i =
2010 Jun 04
0
[LLVMdev] Is there a "callback optimization"?
Hi Kenneth,
> By that I mean an optimization pass (or a combination of them) that turns:
...
> With that transform in place, lots of inlining becomes possible, and
> direct function calls replace indirect function calls if inlining
> isn't appropriate. If this transform is combined with argpromotion
> and scalarrepl, it can be used for devirtualization of C++ virtual
>
2010 Jun 04
0
[LLVMdev] Is there a "callback optimization"?
It should be relatively simple to write a pass that turns each call
that has constant argument(s) into a call to specialized version of
the callee. To devirtualize C++ calls it needs to be smarter, since
the argument is not a constant, but a pointer to a struct that points
to a constant. However, the trick here is
1) Knowing when to perform specialization. If the call was not inlined
the function
2010 Jun 04
3
[LLVMdev] Is there a "callback optimization"?
By that I mean an optimization pass (or a combination of them) that turns:
void useCallback(void (*callbackfn)())
{
// Do something
callbackfn();
// Do something else
}
void myCallback()
{
// Respond one way
}
void myOtherCallback()
{
// Respond another way
}
void foo()
{
useCallback(myCallback);
useCallback(myOtherCallback);
}
into:
// Keep the original; it'll get removed
// by other
2007 May 01
1
Embedding R and registering routines
Hello,
The use of .Call and the like all depend on loading shared libraries and
registering routines from it. Also, .Primitive and .Internal depend on
routines being registered in the R binary. And applications that embed R
can override routines declared in Rinterfac.h, but is there a way for an
application embedding R to register other routines defined in the
application without loading a
2013 Nov 01
0
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
On Thu, Oct 31, 2013 at 11:39 PM, sumeeth kc <sumeethkc at gmail.com> wrote:
> Hello,
>
> I would like to have your opinions on this.
>
> *Problem:*
>
> Currently, there are no ways to perform hypercalls into LLVM (they
> transfer execution from the program being executed to the LLVM
> infrastructure to perform compilation). The goal of this project is to
>
2009 Aug 25
2
Clarifications please.
Hi
I think I have asked these questions earlier, but I been able to find
answers from the documentation (which I found poorly written in several
places). Will someone be kind enough to give me answers and enlighten me?
(as in explain with CODE?)
I want to embed R in my application and use the fPortfolio package for
carrying out risk management computations. Right now I'm reading the
Rmetrics
2008 Nov 11
7
music on hold
hii guys:
i get the message from the asterisk:
Started music on hold, class 'default', on Local/s at skype-web-callback-dial-263to263-1775,1
[2008-11-11 14:32:41] WARNING[1781]: format_wav.c:156 check_header: Unexpected freqency 11025
[2008-11-11 14:32:41] WARNING[1781]: file.c:322 fn_wrapper: Unable to open format wav
[2008-11-11 14:32:41] WARNING[1781]:
2013 Nov 01
0
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
Hi Sumeeth,
I'm not sure I understand what your new mechanism is supposed to add. You can already call functions defined in the host program from generated code. The Kaleidoscope tutorial does this. If the function you want to call is defined in a module that is dynamically loaded and you are using the default memory manager all you need to do is declare a prototype for the function in