search for: altrep

Displaying 20 results from an estimated 164 matches for "altrep".

2019 May 16
3
ALTREP: Bug reports
...he explanation of STDVEC is very helpful and I appreciate it! For the wrapper, I have a few new questions. 1. Like Luke said a mutable object is not possible. However, I noticed that there is one extra argument *deep* in the function duplicate. I've googled all the available documentation for ALTREP but I did not find any explanation of it. Could you please give some detail on it? 2. > The first one correctly returns its internal data structure, but the second > one returns the ALTREP object it wraps since the wrapper itself is an > ALTREP. This behavior is unexpected. I disagree...
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...
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
Hi Gabriel, thanks for your detailed explanation, that definitely clarifies the design choices that were made in setting up the ALTREP framework and I can see how those choices make sure existing code won't break. My specific use-case for wanting to check whether a vector is an ALTREP is the following: the fst package wraps an external C++ library (fstlib, independent from R) that was made for high speed serialization of data...
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
thanks for clearing that up, so these methods are actually not meant to be exported on Windows and OSX? Some of the ALTREP methods that now use 'attribute_hidden' would be very useful to packages that aim to be ALTREP aware, should the currently (exported) API be considered final? thanks for your time & best, Mark On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote: >...
2024 Apr 22
2
Is ALTREP "non-API"?
Hi Yutani, ALTREP is part of the official R api, as illustrated by the presence of src/include/R_ext/Altrep.h. Everything declared in the header files in that directory is official API AFAIK (and I believe that is more definitive than the manuals). The documentation of ALTREP has lagged behind its implementation un...
2024 Apr 22
1
Is ALTREP "non-API"?
...erent from an ordinary sense when we casually say "R C API". You might wonder why I care about such a difference. This is because calling a "non-API" is considered a violation of CRAN repository policy, which means CRAN will kick out the R package. I know many CRAN packages use ALTREP, but just being accepted by CRAN at the moment doesn't mean CRAN will keep accepting it. So, I want to clarify the current status of ALTREP. Best, Yutani 2024?4?22?(?) 10:17 <hcortina71 at gmail.com>: > Hello, I don't believe it is illegal, as ALTREP "implements an abstract...
2020 Oct 07
2
Coercion function does not work for the ALTREP object
Hi all, The coercion function defined for the ALTREP object will not be called by R when an assignment operation implicitly introduces coercion for a large ALTREP object. For example, If I create a vector of length 10, the ALTREP coercion function seems to work fine. ``` > x <- 1:10 > y <- wrap_altrep(x) > .Internal(inspect(y)) @0x000...
2019 May 16
0
ALTREP: Bug reports
...very helpful and I appreciate it! For the wrapper, I have a few new > questions. > > > 1. Like Luke said a mutable object is not possible. However, I noticed > that there is one extra argument *deep* in the function duplicate. I've > googled all the available documentation for ALTREP but I did not find any > explanation of it. Could you please give some detail on it? > Deep means in the case of compound/nested structure, e.g., most easily illustrative the case of a list in R (or VECSXP in C) , do the elements need to be duplicated (deep == TRUE) or *only* the "conta...
2019 May 16
0
ALTREP: Bug reports
Hi Jiefei, Thanks for tryingout the ALTREP stuff and letting us know how it is going. That said I don't think either of these are bugs, per se, but rather a misunderstanding of the API. Details inline. On Thu, May 16, 2019 at 11:57 AM ??? <szwjf08 at gmail.com> wrote: > Hello, > > I have encountered two bugs when usin...
2024 Apr 22
2
Is ALTREP "non-API"?
> On Apr 22, 2024, at 7:37 PM, Gabriel Becker <gabembecker at gmail.com> wrote: > > Hi Yutani, > > ALTREP is part of the official R api, as illustrated by the presence of > src/include/R_ext/Altrep.h. Everything declared in the header files in that > directory is official API AFAIK (and I believe that is more definitive than > the manuals). > That is not true at all - the presence of head...
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...
2024 Apr 22
1
Is ALTREP "non-API"?
Hello, I don't believe it is illegal, as ALTREP "implements an abstraction underneath the C API". And is "compatible with all code which uses the API". Please see slide deck by Gabriel Becker, with L Tierney, M Lawrence and T Kalibera. https://bioconductor.org/help/course-materials/2020/BiocDevelForum/16-ALTREP .pdf ALTRE...
2019 Jun 04
0
[External] undefined symbol errors when compiling package using ALTREP API
Hi Mark, So depending pretty strongly on what you mean by "ALTREP aware", packages aren't necessarily supposed to be ALTREP aware. What I mean by this is that as of right now, ALTREP objects are designed to be interacted with by non-ALTREP-implementing package code, *more-or-less *exactly as standard (non-AR) SEXPs are: via the published C API. The more...
2024 Apr 22
1
Is ALTREP "non-API"?
Thanks for your convincing comment, but it seems the R core team has a different opinion... A few hours ago, src/include/R_ext/Altrep.h got this comment: /* Not part of the API, subject to change at any time. */ commit: https://github.com/r-devel/r-svn/commit/2059bffde642f8426d1f39ab5dd995d19a575d4d While I'm glad to see their attempt to make it clear, I'm confused. That commit marks many other files as...
2019 Jun 05
0
[External] undefined symbol errors when compiling package using ALTREP API
For now you can use R_altrep_inherits(x, R_compact_intseq_class) The variable R_compact_intseq_class should currently be visible to packages on all platforms, though that may change if we eventually provide a string-based lookup mechanism, e.g. somehting like R_find_altrep_class("compact_intseq", "base")...
2020 Feb 03
1
ALTREP "wrapper" classes needs an Extract_subset method
Hi all, I believe I have found a bug (or perhaps just an oversight) with the ALTREP wrapper classes. The short form of this is that I believe that the wrapper classes need to override the default ALTREP `Extract_subset_method()` with a method that calls `Extract_subset()` on the "wrapped" object. I have a patch prepared here: https://github.com/DavisVaughan/r-source/pul...
2020 Oct 08
1
Coercion function does not work for the ALTREP object
Hi Gabriel, here is a simple package for reproducing the problem. https://github.com/Jiefei-Wang/testPkg Best, Jiefei On Thu, Oct 8, 2020 at 5:04 AM Gabriel Becker <gabembecker at gmail.com> wrote: > Jiefei, > > Where does the code for your altrep class live? > > Thanks, > ~G > > On Wed, Oct 7, 2020 at 4:25 AM Jiefei Wang <szwjf08 at gmail.com> wrote: > >> Hi all, >> >> The coercion function defined for the ALTREP object will not be called by >> R >> when an assignment operation implicitl...
2024 Apr 22
1
Is ALTREP "non-API"?
Writing R Extension[1] defines "API" as: Entry points which are documented in this manual and declared in an installed header file. These can be used in distributed packages and will only be changed after deprecation. But, the document (WRE) doesn't have even a single mention of ALTREP, the term "ALTREP" itself or any entry points related to ALTREP. Does this mean, despite the widespread use of it on R packages including CRAN ones, ALTREP is not the API and accordingly using it in distributed packages is considered illegal? Best, Yutani [1]: https://cran.r-project.org...
2019 Jul 23
3
Any plans for ALTREP lists (VECSXP)?
...sly inspect isn't showing all of them). If so, you could load it up into one big vector and then also keep partitioning information around. Bioconductor does this (see ?IRanges::CompressedList ). The potential benefit here being that the underlying large vector could then be a big out-of-memory altrep. How helpful this would be depends somewhat on what you want to do with it, of course, but it is something that comes to mind. Also, I would expect some overhead but that seems like a lot (without having done super much in the way of benchmarking). What exactly is as.altrep doing? Best, ~G On Tu...
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
...return s; > > } > > > > > Best, > > Jiefei > > On Wed, Aug 28, 2019 at 2:32 PM Wang Jiefei <szwjf08 at gmail.com> wrote: > >> Thank you, Gabriel. The loop macro is very helpful. It is also exciting >> to see that there are lots of changes in ALTREP in R devel version. I >> really appreciate your help! >> >> Best, >> Jiefei >> >> On Wed, Aug 28, 2019 at 7:37 AM Gabriel Becker <gabembecker at gmail.com> >> wrote: >> >>> Jiefei, >>> >>> I've been meaning to writ...