similar to: How to preserve data across function calls in a library package

Displaying 20 results from an estimated 300 matches similar to: "How to preserve data across function calls in a library package"

2014 Jul 15
4
[LLVMdev] Partial loop unrolling
Hi, PS: It is a generic question related to partial loop unrolling, and nothing specific to LLVM. As far as partial loop unrolling is concerned, I could see following three different possibilities. Assume that unroll factor is 3. Original loop: for (i = 0; i < 10; i++) { do_foo(i); } 1. First possibility i = 0; do_foo(i++); do_foo(i++);
2009 Apr 24
1
[LLVMdev] Returning structs on Linux x86
Hello all, I've run into a problem with returning a struct on Linux x86. Consider the following two pieces of code: # cat a.ll declare { i32, i32 } @foo(i32, i32, i32) define void @do_foo() { call { i32, i32 } @foo(i32 1, i32 2, i32 3) ret void } # cat b.c #include <stdio.h> #include <stdint.h> extern void
1998 Jun 03
0
R-beta: locfit package.
I was wondering if someone could help me with a problem getting locfit running. I am running Digital Unix 3.2D on an alphastation, with R 0.61.1 I downloaded the CRAN distribution of locfit. I had no problems installing it with R INSTALL (I installed it into my library rather than the default base library; the output is attached at the end of this email message). I then tried to test it with the
2007 Jun 04
2
missing IntegerFromString()
I have created a DLL not so long ago using C code. My code used the IntegerFromString() function that used to be exported in the Rinternals.h header file (and thus easily accessible). Recently I upgraded to R 2.5.0 and my DLL stopped working. I see that the IntegerFromString() function is not exported in any of the header files in the RHOME\include directory. Is it possible for me to use it
2008 Mar 12
0
R code for kernel density using kd-tree, looking for speed up
Dear R-help-list, The following is R function I wrote for computing multi-dimensional kernel density. I am seeking R experts who can make the code to run faster, 50 times faster ideally. Specifically, for function kernel.estimate = function(points, bw), the argument points is a d by n matrix as the n points in the d-dimensional space, bw is the bandwidth. The function will compute the kernel
2010 Nov 19
1
gomp library with Rtools212
Dear developers, I am a maintainer of the CORElearn package which uses OpenMP multithreading to speed up some computations. When producing a new release we tested the package with the latest R 2.12.0. On Linux the package works normally. On Windows we installed a recommended version of Rtools (Rtools212) but the linker fails with the messages below. ... g++
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
Hello, I submit a patch for review that implements code coverage tracing in the R interpreter. It records the lines that are actually executed and their associated frequency for which srcref information is available. I perfectly understands that this patch will not make its way inside R as it is, that they are many concerns of stability, compatibility, maintenance and so on. I would like to have
2001 May 09
1
matrix: suspected integer overflow
Is the following a known issue, in particular in terms of message clarity of the latter two? > matrix(0, 10^8, 10^8) Error: cannot allocate vector of size 2064896 Kb > matrix(0, 20, 10^10) Error in matrix(0, 20, 10^10) : negative length vectors are not allowed > matrix(0, 10^10, 10^10) Error: cannot allocate vector of size 0 Kb # looks better for arrays: > array (0, c(20, 10^10))
2000 Feb 22
2
Some problems with R and/or locfit
Hello, Here is a problem I have had trying to install locfit, the package for R. I have already contacted Clive Loader who thinks the problem has more to do with R than locfit, so here is the point : The version of R I am currently running is R-base-0.90 that I installed using the R-base-0.90.1-1.i386.rpm package. I dowloaded the locfit package available at the CRAN site and ran : R INSTALL
2006 Jan 21
1
A patch for do_sample: check replace arg
A colleague sent me the following: If you specify probabilities in the 'sample' function and forget to type 'prob=...', then you get nonsense. E.g. sample(1:10,1,c(0,0,0,0,1,0,0,0,0,0)) does not filter '5', while sample(1:10,1,prob=c(0,0,0,0,1,0,0,0,0,0)) does it correctly. I wish this would return an error because the
2007 Jun 24
1
There was a problem by the use of snow.
problem of the very large memory require by the Sign extension. --- R-2.5.0.orig/src/main/serialize.c 2007-03-27 01:42:08.000000000 +0900 +++ R-2.5.0/src/main/serialize.c 2007-06-25 00:48:58.000000000 +0900 @@ -1866,7 +1866,7 @@ static void resize_buffer(membuf_t mb, int needed) { - int newsize = 2 * needed; + size_t newsize = 2 * needed; mb->buf = realloc(mb->buf,
2018 Feb 02
1
R-gui sessions end when executing C-code
Hi I'm trying to develop some C code to find the fixpoint of a contraction mapping, the code compiles and gives the right results when executed in R. However R-gui session is frequently terminated. I'm suspecting some access violation error due to the exception code 0xc0000005 In the error report windows 10 gives me. It is the first time I'm writing any C-code so I'm guessing I
2003 May 02
2
Suppressing Scientific Notation
R gurus, Every so often(*) someone asks how to suppress scientific notation in printing, so I thought I'd give it a shot, but I need some help. The formatting decision is made(**) on line 286 of src/main/format.c : if (mF <= *m) { /* IFF it needs less space : "F" (Fixpoint) format */ where mF is the number of characters for "normal" printing and *m is the number
2020 Jun 17
2
subset data.frame at C level
Hi, Hope you are well. I was wondering if there is a function at C level that is equivalent to mtcars$carb or .subset2(mtcars, "carb"). If I have the index of the column then the answer would be VECTOR_ELT(df, asInteger(idx)) but I was wondering if there is a way to do it directly from the name of the column without having to loop over columns names to find the index? Thank you Best
2001 May 10
1
Re: PR#929 and [R] matrix: suspected integer overflow
On Wed, 9 May 2001 andreas.krause@pharma.novartis.com wrote: > Is the following a known issue, in particular in terms of message clarity of the latter two? Yes, bug PR#929. It's a bug in asInteger, an internal C routine which using (int) on a double. coerce.c has better routines used to corce vectors, and the comment /* This section of code handles type conversion for elements */ /* of
2009 Aug 17
4
Calling C functions with value parameters
One hassle I could do without is the necessity of writing C wrapper functions like this: void fameInit(int *status){ cfmini(status); return; } when I want to call a library function (cfmini, in this case) that takes an int argument. The .C interface only lets me pass a pointer to an int, rather than the int itself. Is there any chanch that .C could be enhanced to allow passing arguments by
2019 May 19
2
Race condition on parallel package's mcexit and rmChild
I've been hacking with parallel package for some time and built a parallel processing framework with it. However, although very rarely, I did notice "ignoring SIGPIPE signal" error every now and then. After a deep dig into the source code, I think I found something worth noticing. In short, wring to pipe in the C function mc_exit(SEXP sRes) may cause a SIGPIPE. Code from
2015 Sep 20
2
Long vectors: Missing values and R_xlen_t?
Is there a missing value constant defined for R_xlen_t, cf. NA_INTEGER (== R_NaInt == INT_MIN) for int(eger)? If not, is it correct to assume that missing values should be taken care/tested for before coercing from int or double? Thank you, Henrik
2013 Apr 17
1
stack imbalance in max.col for non-real matrices
It's tough to reliably reproduce, but I often get stack imbalance warnings when calling max.col() on non-real/double matrix. The code is conditionally PROTECTing but not incrementing its nprot counter for the eventual UNPROTECT. Pretty sure this would fix (but I haven't tested it): Index: array.c =================================================================== --- array.c (revision
2008 Feb 11
6
Should I Test My Fixtures?
I have a number of fixtures in my test suite. For example, with acts_as_authenticated and acts_as_state_machine, I created a number of users in different account states for use in functional testing. (Suspended users can not log in, etc) Is it a good idea to run fixtures through tests to ensure that they conform to their ideals? EG: assert users(:suspended_user).suspended? If so, where should