Hi Toby,
Just to be more concrete about why to avoid REAL and about the iteration
macros Luke mentioned.
The ITERATE_BY_REGION* macros in include/R_ext/Itermacros.h are built on
top of *_GET_REGION rather than REAL/INTEGER. The key difference here is
that REAL/INTEGER go down to the Dataptr meth
On Thu, 17 Jun 2021, Toby Hocking wrote:
Oliver, for clarification that section in writing R extensions mentions
VECTOR_ELT and REAL but not REAL_ELT nor any other *_ELT functions. I was
looking for an explanation of all the *_ELT functions (which are apparently
new), not just VECTOR_ELT.
Thanks
Oliver, for clarification that section in writing R extensions mentions
VECTOR_ELT and REAL but not REAL_ELT nor any other *_ELT functions. I was
looking for an explanation of all the *_ELT functions (which are apparently
new), not just VECTOR_ELT.
Thanks Simon that response was very helpful.
One m
The usual quote applies: "use the source, Luke":
$ grep _ELT *.h | sort
Rdefines.h:#define SET_ELEMENT(x, i, val) SET_VECTOR_ELT(x, i, val)
Rinternals.h: The function STRING_ELT is used as an argument to arrayAssign
even
Rinternals.h:#define VECTOR_ELT(x,i)((SEXP *) DATAPTR(x))[i]
R
*_ELT accessor functions are described in "vector accessor functions" in
Writing R extensions.
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Vector-accessor-functions
On Wed, Jun 16, 2021 at 4:22 PM Toby Hocking wrote:
> By the way, where is the documentation for INTEGER_ELT, REA
By the way, where is the documentation for INTEGER_ELT, REAL_ELT, etc? I
looked in Writing R Extensions and R Internals but I did not see any
mention.
REAL_ELT is briefly mentioned on
https://svn.r-project.org/R/branches/ALTREP/ALTREP.html
Would it be possible to please add some mention of them to
Since the INTEGER_ELT, REAL_ELT, etc, functions are fairly new it may
be possible to check that places where they are used allow for them to
allocate. I have fixed the one that got caught by Gabor's example, and
a rchk run might be able to pick up others if rchk knows these could
allocate. (I may
Hi Jim et al,
Just to hopefully add a bit to what Luke already answered, from what I am
recalling looking back at that bioconductor thread Elt methods are used in
places where there are hard implicit assumptions that no garbage collection
will occur (ie they are called on things that aren't PROTEC
>From reading the discussion on the Bioconductor issue tracker it seems like
the reason the GC is not suspended for the non-string ALTREP Elt methods is
primarily due to performance concerns.
If this is the case perhaps an additional flag could be added to the
`R_set_altrep_*()` functions so ALTRE
Thank you Luke, that makes a lot of sense,
Gabor
On Fri, May 28, 2021 at 3:41 PM wrote:
>
> integer and real Elt methods are not expected to allocate. You would
> have to suspend GC to be able to do that. This currently can't be done
> from package code.
>
> Best,
>
> luke
>
> On Fri, 28 May 2021
integer and real Elt methods are not expected to allocate. You would
have to suspend GC to be able to do that. This currently can't be done
from package code.
Best,
luke
On Fri, 28 May 2021, Gábor Csárdi wrote:
I have found some weird SEXP corruption behavior with ALTREP, which
could be a bug
11 matches
Mail list logo