Displaying 6 results from an estimated 6 matches for "integer_elt".
Did you mean:
integer_cst
2020 Feb 03
1
ALTREP "wrapper" classes needs an Extract_subset method
...REP compact integer seq that has been
"wrapped". The default subsetting code will eventually call
`ExtractSubset()`. That checks if the object is ALTREP, and calls the
ALTREP Extract_subset() method if so. If the return value from that is
NULL, then it will fallback to repeatedly calling `INTEGER_ELT()` to do the
subsetting. See below for the relevant section:
https://github.com/wch/r-source/blob/d1c0c6b921fc6a0cbe82c4354c6ec6ceb7f320aa/src/main/subset.c#L103
This wrapped compact integer seq is an ALTREP object, so `ALTREP(x)`
returns true. But then it just calls the default method of returni...
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
...that they don't allocate, generally. Basically your methods for
Dataptr_or_null shouldn't allocate, but you also should not write code that
relies on hard assumptions that no one's ever will.
Also, a small nitpick, R's internal mean function doesn't hit Dataptr, it
hits either INTEGER_ELT (which really should probably be a
ITERATE_BY_REGION) or ITERATE_BY_REGION.
Anyway, I hope that helps.
~G
On Mon, Sep 23, 2019 at 6:12 PM Bob Rudis <bob at rud.is> wrote:
> Not sure if you're using just C++ or Rcpp for C++ access but
> https://purrple.cat/blog/2018/10/14/alt...
2019 Feb 27
2
Intermittent crashes with inset `[<-` command
...741C: Rf_eval (eval.c:691)
==4711== by 0x4FA7181: Rf_ReplIteration (main.c:258)
==4711== by 0x4FA7570: R_ReplConsole (main.c:308)
==4711== by 0x4FA760E: run_Rmainloop (main.c:1082)
==4711== by 0x40075A: main (Rmain.c:29)
==4711==
==4711== Invalid read of size 1
==4711== at 0x501C582: INTEGER_ELT (Rinlinedfuns.h:381)
==4711== by 0x501C582: VectorAssign (subassign.c:710)
==4711== by 0x501CDFE: do_subassign_dflt (subassign.c:1641)
==4711== by 0x5020100: do_subassign (subassign.c:1571)
==4711== by 0x4F66398: bcEval (eval.c:6795)
==4711== by 0x4F7D86D: R_compileAndExecute (eval.c...
2019 Feb 27
0
Intermittent crashes with inset `[<-` command
...711== by 0x4FA7181: Rf_ReplIteration (main.c:258)
> ==4711== by 0x4FA7570: R_ReplConsole (main.c:308)
> ==4711== by 0x4FA760E: run_Rmainloop (main.c:1082)
> ==4711== by 0x40075A: main (Rmain.c:29)
> ==4711==
> ==4711== Invalid read of size 1
> ==4711== at 0x501C582: INTEGER_ELT (Rinlinedfuns.h:381)
> ==4711== by 0x501C582: VectorAssign (subassign.c:710)
> ==4711== by 0x501CDFE: do_subassign_dflt (subassign.c:1641)
> ==4711== by 0x5020100: do_subassign (subassign.c:1571)
> ==4711== by 0x4F66398: bcEval (eval.c:6795)
> ==4711== by 0x4F7D86D: R_...
2019 Feb 26
8
Intermittent crashes with inset `[<-` command
The following code crashes after about 300 iterations on my?x86_64-w64-mingw32?machine on R 3.5.2 --vanilla.??
Others have duplicated this (see?https://github.com/tidyverse/magrittr/issues/190?if necessary), but I don't know how machine/OS-dependent it may be.??
If it doesn't crash for you, please try increasing the length of the x vector.
Substituting the commented-out line for the one
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
Sorry for post a lot of things, for the first part of code, I copied my C++
iter macro by mistake(and you can see an explicit type casting). Here is
the macro definition from R_exts/Itermacros.h
#define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \
strt, nfull, expr) do { \
* const** etype *px = DATAPTR_OR_NULL(sx); *