search for: __ibr_n__

Displaying 9 results from an estimated 9 matches for "__ibr_n__".

2019 Oct 23
2
Unexpected behavior when using macro to loop over vector
...termacros.h" #define GET_REGION_BUFSIZE 2 //Redefine the macro since C++ is not happy with the implicit type conversion #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ if (px != NULL) { \ R_xlen_t __ibr_n__ = strt + nfull; \ R_xlen_t nb = __ibr_n__; \ for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ expr \ } \ } \ else ITERATE_BY_REGION_PARTIAL0(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr); \ } while (0) // [[Rcpp::export]] void C_testPrint(SEXP x) { ITERATE_BY_REGION_...
2019 Oct 25
2
Unexpected behavior when using macro to loop over vector
...e the macro since C++ is not happy with the implicit type >> conversion >> #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ >> ? strt, nfull, expr) do { \ >> const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ >> if (px != NULL) { \ >> ??? R_xlen_t __ibr_n__ = strt + nfull; \ >> ??? R_xlen_t nb = __ibr_n__; \ >> ??? for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ >> expr \ >> ???? } \ >> } \ >> else ITERATE_BY_REGION_PARTIAL0(sx, px, idx, nb, etype, vtype, \ >> strt, nfull, expr); \ >> ???? }...
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
...h #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ * const** etype *px = DATAPTR_OR_NULL(sx); * \ if (px != NULL) { \ R_xlen_t __ibr_n__ = strt + nfull; \ R_xlen_t nb = __ibr_n__; \ for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ expr \ }...
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
...\ > > > > strt, nfull, expr) do { \ > > > > * const** etype *px = DATAPTR_OR_NULL(sx); * > \ > > > > if (px != NULL) { \ > > > > R_xlen_t __ibr_n__ = strt + nfull; \ > > > > R_xlen_t nb = __ibr_n__; \ > > > > for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ > > > > expr...
2019 Sep 24
0
What is the best way to loop over an ALTREP vector?
...sx, px, idx, nb, etype, vtype, \ > > strt, nfull, expr) do { \ > > * const** etype *px = DATAPTR_OR_NULL(sx); * \ > > if (px != NULL) { \ > > R_xlen_t __ibr_n__ = strt + nfull; \ > > R_xlen_t nb = __ibr_n__; \ > > for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ > > expr \ > >...
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
...BUFSIZE 2 > //Redefine the macro since C++ is not happy with the implicit type > conversion > #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ > strt, nfull, expr) do { \ > const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ > if (px != NULL) { \ > R_xlen_t __ibr_n__ = strt + nfull; \ > R_xlen_t nb = __ibr_n__; \ > for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ > expr \ > } \ > } \ > else ITERATE_BY_REGION_PARTIAL0(sx, px, idx, nb, etype, vtype, \ > strt, nfull, expr); \ > } while (0) > // [[Rcpp::expor...
2019 Aug 28
3
What is the best way to loop over an ALTREP vector?
Hi devel team, I'm working on C/C++ level ALTREP compatibility for a package. The package previously used pointers to access the data of a SEXP, so it would not work for some ALTREP objects which do not have a pointer. I plan to rewrite the code and use functions like get_elt, get_region, and get_subset to access the values of a vector, so I have a few questions for ALTREP: 1. Since an
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
...appy with the implicit type > >> conversion > >> #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ > >> strt, nfull, expr) do { \ > >> const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ > >> if (px != NULL) { \ > >> R_xlen_t __ibr_n__ = strt + nfull; \ > >> R_xlen_t nb = __ibr_n__; \ > >> for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ > >> expr \ > >> } \ > >> } \ > >> else ITERATE_BY_REGION_PARTIAL0(sx, px, idx, nb, etype, vtype, \ > >> st...
2019 Sep 23
0
What is the best way to loop over an ALTREP vector?
...guage? #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ *const etype *px = (const** etype *)DATAPTR_OR_NULL(sx); * \ if (px != NULL) { \ R_xlen_t __ibr_n__ = strt + nfull; \ R_xlen_t nb = __ibr_n__; \ for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ expr \ }...