Displaying 20 results from an estimated 37 matches for "init_r".
Did you mean:
init_vr
2009 Sep 07
1
Usage of OCaml/R binding.
...here's also a Rmath module for the math library
which I'm not yet concerned about).
I'd specifically appreciate information on how to get started using
these R API functions. If you're scared about OCaml, simply look at the
two declarations below in the following way:
external init_r : string array -> int = "init_r"
'external' means that this value is to be fetched by linking C code
identified by the '= "init_r"' ending statement. Typically, 'external'
values wrap the API functions. So this value is called init_r, and takes
an...
2009 Sep 07
1
Usage of OCaml/R binding.
...here's also a Rmath module for the math library
which I'm not yet concerned about).
I'd specifically appreciate information on how to get started using
these R API functions. If you're scared about OCaml, simply look at the
two declarations below in the following way:
external init_r : string array -> int = "init_r"
'external' means that this value is to be fetched by linking C code
identified by the '= "init_r"' ending statement. Typically, 'external'
values wrap the API functions. So this value is called init_r, and takes
an...
2009 May 19
2
About " Error: C stack usage is too close to the limit"
...rmation list behand
-----------------------------
1, my example code lists here:
-----------------------------
#include ....
void *ts_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...
2019 Apr 05
2
Parsing code with newlines
...unable to initialize the JIT
That aside, here is the code with newlines that fails to parse. I hope
it will paste alright here.
#include "embeddedRCall.h"
#include <R_ext/Parse.h>
int
main(int argc, char *argv[])
{
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, &am...
2015 Aug 25
0
Child thread libR.so
Simon,
Ah, thank you! quiet right. For anyone searching for this in the
future, I changed my init fuction to:
---------- SNIP ----------------
void init_r() {
SEXP aperm_function;
/* this is our version of Rf_initEmbeddedR where we disable stack
checking */
const char *init_argv[] = {"MyFront", "--vanilla", "--slave"};
Rf_initialize_R(sizeof (init_argv) / sizeof (init_argv[0]),
(char**) init_argv);...
2015 Aug 20
2
Child thread libR.so
...e_R).
Cheers,
Simon
---------------------------------------- SNIP
------------------------------------------------------------------------------
my code is as follows
---------------------------------------- SNIP
------------------------------------------------------------------------------
void init_r() {
SEXP aperm_function;
const char *init_argv[] = {"MyFront", "--vanilla", "--slave"};
Rf_initEmbeddedR(sizeof (init_argv) / sizeof (init_argv[0]),
(char**) init_argv);
R_CStackLimit = (uintptr_t)-1;
/*
* transposeVector above uses the R bu...
2019 Apr 10
0
Parsing code with newlines
...nes that fails to parse. I hope
> it will paste alright here.
>
>
> #include "embeddedRCall.h"
> #include <R_ext/Parse.h>
>
> int
> main(int argc, char *argv[])
> {
> 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
> {
> PrintVal...
2009 May 18
0
About " Error: C stack usage is too close to the limit"
...rmation list behand
-----------------------------
1, my example code lists here:
-----------------------------
#include ....
void *ts_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...
2007 Mar 16
2
[Bug 1299] Remove redefinition of _res in getrrsetbyname.c
...OpenSSH (at least on
NetBSD), and makes _res be that instead of the "real" _res (however
that
might be defined on various platforms).
_res is used only in the getrrsetbyname function, which never
initializes it in any way, but tries to act as if it's using the real
_res. So it calls init_res every time:
if ((_resp->options & RES_INIT) == 0 && res_init() == -1) {
and it never turns on DNSSEC, even when RES_USE_EDNS0 is set, since
it's
checking for it in the wrong place:
if (_resp->options & RES_USE_EDNS0)
_resp->options |= RE...
2009 May 19
0
About " Error: C stack usage is too close to the limit"--resend
...rmation list behand
-----------------------------
1, my example code lists here:
-----------------------------
#include ....
void *ts_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...
2007 Mar 12
1
Redefinition of _res in getrrsetbyname.c
...OpenSSH (at least on
NetBSD), and makes _res be that instead of the "real" _res (however that
might be defined on various platforms).
_res is used only in the getrrsetbyname function, which never
initializes it in any way, but tries to act as if it's using the real
_res. So it calls init_res every time:
if ((_resp->options & RES_INIT) == 0 && res_init() == -1) {
and it never turns on DNSSEC, even when RES_USE_EDNS0 is set, since it's
checking for it in the wrong place:
if (_resp->options & RES_USE_EDNS0)
_resp->options |= RES_US...
2015 Aug 24
0
Child thread libR.so
...---------------------------- SNIP
> ------------------------------------------------------------------------------
>
> my code is as follows
>
> ---------------------------------------- SNIP
> ------------------------------------------------------------------------------
> void init_r() {
> SEXP aperm_function;
>
> const char *init_argv[] = {"MyFront", "--vanilla", "--slave"};
> Rf_initEmbeddedR(sizeof (init_argv) / sizeof (init_argv[0]),
> (char**) init_argv);
>
> R_CStackLimit = (uintptr_t)-1;
>
> /*...
2019 Apr 10
1
Parsing code with newlines
...lright here.
>>
>>
>> #include "embeddedRCall.h"
>> #include <R_ext/Parse.h>
>>
>> int
>> main(int argc, char *argv[])
>> {
>> 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
&g...
2005 Feb 04
5
simple example of C interface to R
i'd like to use the C interface to R in a program i'm writing. as a
starting point, i'm trying to create a very simple C program that uses
R. i've read the R documentation on this, but i'm having trouble
figuring out where SEXP is defined and how to use it.
i noticed someone else on this list also tried to use the C interface,
but they ran into similar problems:
2019 Nov 22
0
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...id mdio_write(struct net_device *dev, int phy_id, int location, int value);
static int netdev_open(struct net_device *dev);
static void check_duplex(struct net_device *dev);
-static void tx_timeout(struct net_device *dev);
+static void tx_timeout(struct net_device *dev, int txqueue);
static void init_ring(struct net_device *dev);
static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
@@ -1105,7 +1105,7 @@ static void check_duplex(struct net_device *dev)
}
-static void tx_timeout(struct net_device *dev)
+static...
2019 Nov 23
1
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...phy_id, int location, int value);
> static int netdev_open(struct net_device *dev);
> static void check_duplex(struct net_device *dev);
> -static void tx_timeout(struct net_device *dev);
> +static void tx_timeout(struct net_device *dev, int txqueue);
> static void init_ring(struct net_device *dev);
> static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
> static irqreturn_t intr_handler(int irq, void *dev_instance);
> @@ -1105,7 +1105,7 @@ static void check_duplex(struct net_device *dev)
> }
>
>
> -static void tx_timeout(...
2019 Nov 22
4
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
Hi Michael,
Em sex., 22 de nov. de 2019 ?s 07:31, Michael S. Tsirkin
<mst at redhat.com> escreveu:
>
> On Thu, Nov 21, 2019 at 10:36:36PM -0300, Julio Faracco wrote:
> > Driver virtio_net is not handling error events for TX provided by
> > dev_watchdog. This event is reached when transmission queue is having
> > problems to transmit packets. This could happen for any
2019 Nov 22
4
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
Hi Michael,
Em sex., 22 de nov. de 2019 ?s 07:31, Michael S. Tsirkin
<mst at redhat.com> escreveu:
>
> On Thu, Nov 21, 2019 at 10:36:36PM -0300, Julio Faracco wrote:
> > Driver virtio_net is not handling error events for TX provided by
> > dev_watchdog. This event is reached when transmission queue is having
> > problems to transmit packets. This could happen for any
2019 Nov 24
0
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...id mdio_write(struct net_device *dev, int phy_id, int location, int value);
static int netdev_open(struct net_device *dev);
static void check_duplex(struct net_device *dev);
-static void tx_timeout(struct net_device *dev);
+static void tx_timeout(struct net_device *dev, int txqueue);
static void init_ring(struct net_device *dev);
static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
@@ -1105,7 +1105,7 @@ static void check_duplex(struct net_device *dev)
}
-static void tx_timeout(struct net_device *dev)
+static...
2019 Nov 24
3
[PATCH net-next v2] drivers: net: virtio_net: Implement a dev_watchdog handler
...id mdio_write(struct net_device *dev, int phy_id, int location, int value);
static int netdev_open(struct net_device *dev);
static void check_duplex(struct net_device *dev);
-static void tx_timeout(struct net_device *dev);
+static void tx_timeout(struct net_device *dev, int txqueue);
static void init_ring(struct net_device *dev);
static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance);
@@ -1105,7 +1105,7 @@ static void check_duplex(struct net_device *dev)
}
-static void tx_timeout(struct net_device *dev)
+static...