Displaying 4 results from an estimated 4 matches for "c_testfunc".
Did you mean:
__testfunc
2019 May 16
3
ALTREP: Bug reports
Hello,
I have encountered two bugs when using ALTREP APIs.
1. STDVEC_DATAPTR
>From RInternal.h file it has a comment:
/* ALTREP support */
> void *(STDVEC_DATAPTR)(SEXP x);
However, this comment might not be true, the easiest way to verify it is to
define a C++ function:
void C_testFunc(SEXP a)
> {
> STDVEC_DATAPTR(a);
> }
and call it in R via
> a=1:10
> > C_testFunc(a)
> Error in C_testFunc(a) : cannot get STDVEC_DATAPTR from ALTREP object
We can inspect the internal type and call ALTREP function to check if it
is an ALTREP:
> .Internal(inspect(a))...
2019 May 16
3
ALTREP: Bug reports
...t;> From RInternal.h file it has a comment:
>>
>> /* ALTREP support */
>> > void *(STDVEC_DATAPTR)(SEXP x);
>>
>>
>> However, this comment might not be true, the easiest way to verify it is
>> to
>> define a C++ function:
>>
>> void C_testFunc(SEXP a)
>> > {
>> > STDVEC_DATAPTR(a);
>> > }
>>
>>
>> and call it in R via
>>
>> > a=1:10
>> > > C_testFunc(a)
>> > Error in C_testFunc(a) : cannot get STDVEC_DATAPTR from ALTREP object
>>
>>
> The STDV...
2019 May 16
0
ALTREP: Bug reports
...ALTREP APIs.
>
> 1. STDVEC_DATAPTR
>
> From RInternal.h file it has a comment:
>
> /* ALTREP support */
> > void *(STDVEC_DATAPTR)(SEXP x);
>
>
> However, this comment might not be true, the easiest way to verify it is to
> define a C++ function:
>
> void C_testFunc(SEXP a)
> > {
> > STDVEC_DATAPTR(a);
> > }
>
>
> and call it in R via
>
> > a=1:10
> > > C_testFunc(a)
> > Error in C_testFunc(a) : cannot get STDVEC_DATAPTR from ALTREP object
>
>
The STDVEC here refers to the SEXP not being an ALTREP. Anyth...
2019 May 16
0
ALTREP: Bug reports
...mment:
>>>
>>> /* ALTREP support */
>>> > void *(STDVEC_DATAPTR)(SEXP x);
>>>
>>>
>>> However, this comment might not be true, the easiest way to verify it is
>>> to
>>> define a C++ function:
>>>
>>> void C_testFunc(SEXP a)
>>> > {
>>> > STDVEC_DATAPTR(a);
>>> > }
>>>
>>>
>>> and call it in R via
>>>
>>> > a=1:10
>>> > > C_testFunc(a)
>>> > Error in C_testFunc(a) : cannot get STDVEC_DATAPTR from ALTRE...