Displaying 9 results from an estimated 9 matches for "nfull".
Did you mean:
full
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
...ry 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); * \
if (px != NULL) { \
R_xlen_t __ibr_n__ = strt + nfull; \
R_xlen_t nb = __ibr_n__;...
2019 Oct 23
2
Unexpected behavior when using macro to loop over vector
...quot; to loop over an atomic vector. Here is a minimum
example:
C++ code
```
#include "R_ext/Itermacros.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,...
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
...ied 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); *
> \
> >
> > if (px != NULL) { \
> >
> > R_xlen_t __ibr_n__ = strt + nfull; \
> >
>...
2019 Oct 25
2
Unexpected behavior when using macro to loop over vector
...; C++ code
>> ```
>> #include "R_ext/Itermacros.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 \
>> ???? } \...
2019 Sep 24
0
What is the best way to loop over an ALTREP vector?
...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); * \
>
> if (px != NULL) { \
>
> R_xlen_t __ibr_n__ = strt + nfull; \
>
> R_xlen_t nb = _...
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 Sep 23
0
What is the best way to loop over an ALTREP vector?
...onst void * to const int
*), see below. While it is allowed in C, C++ seems not happy with it. Is it
possible to add an explicit type casting so that it can be compatible with
both language?
#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__;...
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
...nimum
> example:
>
> C++ code
> ```
> #include "R_ext/Itermacros.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_B...
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
...gt;> #include "R_ext/Itermacros.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) { \
> >...