search for: altrep_int_region

Displaying 1 result from an estimated 1 matches for "altrep_int_region".

2019 Mar 01
1
Surprising results from INTEGER_GET_REGION with ALTREP object
...(SEXP _x, SEXP _i, SEXP _n) { int i = INTEGER(_i)[0]; int n = INTEGER(_n)[0]; SEXP result = PROTECT(Rf_allocVector(INTSXP, n)); INTEGER_GET_REGION(_x, i, n, INTEGER(result)); UNPROTECT(1); return result; } For "shorter" vectors, the result is as expected: > dyn.load("altrep_int_region.so") > .Call("integer_get_region", 1:1e9, 0L, 10L) [1] 1 2 3 4 5 6 7 8 9 10 But not for "longer" vectors: > .Call("integer_get_region", 1:1e10, 0L, 10L) [1] 0 1072693248 0 1073741824 0 1074266112 [7] 0 107479...