similar to: STRING_IS_SORTED claims as.character(1:100) is sorted

Displaying 20 results from an estimated 200 matches similar to: "STRING_IS_SORTED claims as.character(1:100) is sorted"

2018 Oct 08
2
bug with OutDec option and deferred_string altrep object
While implementing R's new 'altrep' functionality in the TERR engine, I discovered a bug in R's 'deferred_string' altrep object: it is not using the correct value of the 'OutDec' option when it expands a deferred_string. See the following example: R 3.5.1: (same results in R 3.6.0 devel engine built 10/5) > options(scipen=0, OutDec=".") >
2019 Oct 24
2
Replicate Individual O3 optimizations
I run matrix multiplication code with both the approaches o3 at clang and o3 at opt. clang o3 is about 2.97x faster than opt o3. On Mon, Oct 21, 2019 at 8:24 AM Neil Nelson <nnelson at infowest.com> wrote: > is_sorted.cpp > bool is_sorted(int *a, int n) { > > for (int i = 0; i < n - 1; i++) > > if (a[i] > a[i + 1]) > return false; > return
2019 Sep 03
2
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi, I would like to figure out the meaning of the return value of these two functions. Here are the default definitions I find from R source code: static int altreal_Is_sorted_default(SEXP x) { return UNKNOWN_SORTEDNESS; } static int altreal_No_NA_default(SEXP x) { return 0; } I guess the macro *UNKNOWN_SORTEDNESS *in *Is_sorted* and 0 in *No_NA *simply means unknown sorted/NA status of
2019 Oct 19
3
Replicate Individual O3 optimizations
On Thu, Oct 17, 2019 at 11:22 AM David Greene via llvm-dev < llvm-dev at lists.llvm.org> wrote: > hameeza ahmed via llvm-dev <llvm-dev at lists.llvm.org> writes: > > > Hello, > > I want to study the individual O3 optimizations. For this I am using > > following commands, but unable to replicate O3 behavior. > > > > 1.
2018 Oct 08
4
R_ext/Altrep.h should be more C++-friendly
I am not able to #include "R_ext/Altrep.h" from a C++ file. I think it needs two changes: 1. add the same __cplusplus check as most of the other header files: #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif 2. change the line R_new_altrep(R_altrep_class_t class, SEXP data1, SEXP data2); to
2018 Oct 09
0
bug with OutDec option and deferred_string altrep object
Thanks for the report. The approach you outlines below should work -- I'll look into it. Best, luke On Mon, 8 Oct 2018, Michael Sannella wrote: > While implementing R's new 'altrep' functionality in the TERR engine, > I discovered a bug in R's 'deferred_string' altrep object: it is not > using the correct value of the 'OutDec' option when it expands
2018 Nov 07
2
error unserializing ascii format (v2 or v3)
I ran into an interesting error unserializing a file created with ascii=TRUE: R 3.5.1 (Windows or Linux): > unserialize(serialize(list(raw=as.raw(c(39,41))), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw = as.raw(c(39, 41))), NULL, version = 2, : ReadItem: unknown type 29, perhaps written by later version of R The same error happens when the
2018 Oct 22
1
v3 serialization of compact_intseq altrep should write modified data
Experimenting with altrep objects and v3 serialization, I discovered a possible bug. Calling DATAPTR on a compact_intseq object returns a pointer to the expanded integer sequence in memory. If you modify this data, the object values appear to be changed. However, if the compact_intseq object is then serialized (with version=3), only the original integer sequence info is written. For example,
2019 Sep 04
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi, I've found the answers to my questions: 1. For sort function, here are some macros defined in Rinternal.h: /* ALTREP sorting support */ enum {SORTED_DECR_NA_1ST = -2, SORTED_DECR = -1, UNKNOWN_SORTEDNESS = INT_MIN, /*INT_MIN is NA_INTEGER! */ SORTED_INCR = 1, SORTED_INCR_NA_1ST = 2, KNOWN_UNSORTED = 0}; The macro names are pretty self-explanatory. The
2019 Sep 11
0
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi Jiefei, The meanings of the return values for sortedness can be found in RInternals.h, and are as follows: /* ALTREP sorting support */ enum {SORTED_DECR_NA_1ST = -2, SORTED_DECR = -1, UNKNOWN_SORTEDNESS = INT_MIN, /*INT_MIN is NA_INTEGER! */ SORTED_INCR = 1, SORTED_INCR_NA_1ST = 2, KNOWN_UNSORTED = 0}; The default value there is NA_INTEGER (ie INT_MIN),
2019 Sep 11
1
[ALTREP] What is the meaning of the return value of Is_sorted and No_NA function?
Hi Gabriel, Thanks for your answer and future update plan. Somehow this email has been delayed for a week, so there might be a wired reply from me saying that I have found the answer from the R source code, it was sent from me last week. Hopefully, this reply will not cost another week to post:) As a side note, I like the idea that defining a macro for sortedness, and I can see why we can only
2018 Oct 09
0
R_ext/Altrep.h should be more C++-friendly
Michael, Thanks for reaching out. This was brought up by Romaine Francois offline to me as well. What he does as a workaround is #define class klass extern "C" { #include <R_ext/Altrep.h> } #undef class While we consider changing Altrep.h, the above should work for you in the immediate term. Let me know if it doesn't. ~G On Mon, Oct 8, 2018 at 4:17 PM, Michael
2018 Nov 08
0
error unserializing ascii format (v2 or v3)
I see this on MacOS as well, so likely not platform dependent. A little more diddling to try to narrow it down: > unserialize(serialize(as.raw(1), NULL, version=2, ascii=TRUE)) [1] 30 > unserialize(serialize(list(as.raw(1)), NULL, version=2, ascii=TRUE)) [[1]] [1] 30 > unserialize(serialize(list(raw=as.raw(1)), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw =
2004 Mar 17
1
best methods for strings and structures?
I'm trying to generate an R interface for a library that's commonly used and I'm currently writing wrapper functions for file i/o and return an object (list?) that contains the elements of the C structure. For example, reading a file that contains: struct CONFIG_RECORD { char coeffs_filename[256]; char species_filename[256]; unsigned long
2006 May 23
1
protect
I have a few simple questions about the usage of PROTECT, more specifically how careful one needs to be. Simple yes/no answers are fine. Most of the uses I have seen do protection when memory is allocated. But what if one just want to assign a value of another function to a variable. Say eg. that foo is a function that returns a SEXP. Would the following code be fine? SEXP bar;
2007 Aug 16
0
call R function in c++ program
Hi all I don't know if my message are correct in this forums. I create a program in c++ who use statistical function. I want to execute this function in R (in particular for use packages ade4, lattice, bioconductor...) Until now, my program work for simple function ("plot", "rnorm"...) but I can't use library My class are : // in constructor int argc = 1;
2003 Sep 29
0
ext3 filesystem with directory errors, e2fsck claims to be error free.
I have a bit of a problem with the machine I use at home for backups. The main partition the backups reside on is a 4 disk RAID-5, totaling around 240GB. This has had some sort of corruption inflicted on it, in the content of the (at least) one directory, where there are now corrupted directory entries. This happened after I added an additional SiS PCI IDE controller card to the machine and put
2009 Dec 26
2
A program under WINE claims I don't have enough memory
I'm running Origin 7 Server (a scientific data & graph editing software) under Ubuntu 9.10. Installation was fine and I can read files and edit them, but as I try to save the simplest thing (which takes less than a MB) the program claims I have no disk space (I do have more than 10GB free). I have a 64GB solid-state hard drive on my Dell E6400 laptop. This problem persists no matter where
2013 Mar 12
2
[Bug 2078] New: Documentation claims ~.ssh/config must not be accessible by others when actually it must not be readable
https://bugzilla.mindrot.org/show_bug.cgi?id=2078 Bug ID: 2078 Summary: Documentation claims ~.ssh/config must not be accessible by others when actually it must not be readable Classification: Unclassified Product: Portable OpenSSH Version: 5.9p1 Hardware: Other OS: Linux
2005 Sep 13
0
Real-time Linux claims single-digit microsecond responsiveness
This should be of interest to us, asterisk buffs: http://www.linuxdevices.com/news/NS6761928882.html -- "We hold [...] that all men are created equal; that they are endowed [...] with certain inalienable rights; that among these are life, liberty, and the pursuit of happiness" -- Thomas Jefferson -------------- next part -------------- An HTML attachment was scrubbed... URL: