similar to: storage.mode, C data types and speed

Displaying 20 results from an estimated 10000 matches similar to: "storage.mode, C data types and speed"

2017 May 19
4
memcmp code fragment
Hi, Look at the following code: Look at the following C code seqence: unsigned char mainGtU ( unsigned int i1, unsigned int i2, unsigned char* block) { unsigned char c1, c2; c1 = block[i1]; c2 = block[i2]; if (c1 != c2) return (c1 > c2); i1++; i2++; c1 = block[i1]; c2 = block[i2]; if (c1 != c2) return (c1 > c2); i1++; i2++; .. ..
2009 Dec 19
4
expand.grid game
Dear list, In a little numbers game, I've hit a performance snag and I'm not sure how to code this in C. The game is the following: how many 8-digit numbers have the sum of their digits equal to 17? The brute-force answer could be: maxi <- 9 # digits from 0 to 9 N <- 5 # 8 is too large test <- 17 # for example's sake sum(rowSums(do.call(expand.grid, c(list(1:maxi),
2020 Mar 30
2
Scalar Evolution Expressions Involving Sibling Loops
> I'm not following your example.  If you have two sibling loops with the same parent, one will frequently, but not always dominate the other.  Can you give a specific example of when forming a recurrence between two siblings (without one dominating the other), is useful? The situation can happen with guarded loops or with a user guard like below: if (c) { for (i = 0; i < n; i++)
2005 Oct 12
1
Using matprod from array.c
Hi, I was wondering if I could use the matprod function from array.c in my own C routine. I tried the following as a test /* my_matprod.c */ # include <Rinternals.h> /* for REAL, SEXP etc */ # include <R_ext/Applic.h> /* array.c says need for dgemm */ /* following copied from array.c */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z)
2020 Apr 16
2
Scalar Evolution Expressions Involving Sibling Loops
Hi Jimmy, It's good to know that the problem is not specific to the case I ran into. May be you can provide your example as well, since Philip seems to be interested in some specific examples. If the assertion in getAddrExpr is deemed necessary, then I think a condition check would be the next best solution as it helps client code guard against such cases and make alternative arrangements to
2020 Apr 17
2
Scalar Evolution Expressions Involving Sibling Loops
Thanks for sharing the known problem. I think to solve the problem properly, we need to fully understand why that assumption about dominance is there and the implications of removing it. It would be good if you could be more specific about your idea of nullptr or SCEV_unknown (eg which function would return those values and when), but returning nullptr from getAddExpr or getSCEVAtScope may be
2017 Sep 20
4
[PATCH 0/4] Replace some uses of the Str module with PCRE.
Str is a pretty ugly regexp module. Let's try to replace it with PCRE. This series of commits goes some small way towards that eventual goal. - - - I wonder if there was a deep reason why we had this? let unix2dos s = String.concat "\r\n" (Str.split_delim (Str.regexp_string "\n") s) I replaced it with what I think should be (nearly) equivalent: let unix2dos s =
2017 Sep 22
0
[PATCH v3 02/22] common/mlpcre: Add PCRE.subi to return indexes instead of the substring.
--- common/mlpcre/PCRE.ml | 3 +-- common/mlpcre/PCRE.mli | 14 ++++++++++++++ common/mlpcre/pcre-c.c | 27 +++++++++++++++++++++++++++ common/mlpcre/pcre_tests.ml | 19 ++++++++++++++++--- 4 files changed, 58 insertions(+), 5 deletions(-) diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml index 94eea4b34..5269d41f8 100644 --- a/common/mlpcre/PCRE.ml +++
2019 Dec 09
3
Inconsistent behavior for the C AP's R_ParseVector() ?
Le lun. 9 d?c. 2019 ? 05:43, Tomas Kalibera <tomas.kalibera at gmail.com> a ?crit : > On 12/7/19 10:32 PM, Laurent Gautier wrote: > > Thanks for the quick response Tomas. > > The same error is indeed happening when trying to have a zero-length > variable name in an environment. The surprising bit is then "why is this > happening during parsing" (that is why
2020 Mar 30
2
Scalar Evolution Expressions Involving Sibling Loops
Forwarding to the dev list, in case others ran into similar issues and/or have input on this topic. Bardia Mahjour ----- Forwarded by Bardia Mahjour/Toronto/IBM on 2020/03/30 02:25 PM ----- From: Bardia Mahjour/Toronto/IBM To: listmail at philipreames.com Cc: "Michael Kruse" <llvm at meinersbur.de> Date: 2020/03/26 11:47 AM Subject: Scalar Evolution Expressions Involving Sibling
2009 Jun 10
2
How to get the unique pairs of a set of pairs dataframe ?
Hi friends, Please can anyone help me with an easier solution of doing the below mentioned work. Suppose i have a dataset like this:--- i1 i2 i3 i4 i5 1 7 13 1 2 2 8 14 2 2 3 9 15 3 3 4 10 16 4 4 5 11 17 5 5 6 12 18 6 7 *i1,i2,i3,i4,i5 are my items.I am able to find all possible pairs i.e Say this dataframe is "item_pairs" **i1,i2 **i1,i3 **i1,i4 i1,i5 **i2,i1
2017 Oct 18
1
uniform sampling without replacement algorithm
> From: "Pavel S. Ruzankin" <ruzankin at math.nsc.ru> > Let us consider the current uniform sampling without replacement > algorithm. It resides in function do_sample in > https://svn.r-project.org/R/trunk/src/main/random.c > Its complexity is obviously O(n), where the sample is selected from > 1...n, since the algorithm has to create a vector of length n. So
2013 Jan 02
0
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
Hi Duncan & Tobi, Thanks a lot for your interest, and for pointing out differences in GIMPLE I missed. Attached is simplified test case. Is it good? Tobi, regarding runtime alias analysis: in KernelGen we already do it along with runtime values substitution. For example: <------------------ __kernelgen_main_loop_17: compile started ---------------------> Integer args substituted:
2010 Jan 14
2
Fixed size permutations
I'm using functions to return a matrix of all permutations of a specified size from a larger list for predictor selection. For each predictor size I use a seperate function like this: bag2 <- function(n) { rl <- c() for (i1 in seq(n)) { for (i2 in seq(n)) { if (length(unique(c(i1,i2)))==1) {next} rl <- cbind(rl,matrix(c(i1,i2))) } }
2017 Sep 25
3
What should a truncating store do?
On 9/25/2017 9:14 AM, Björn Pettersson A wrote: > > (Not sure if this exactly maps to “truncating store”, but I think it > at least touches some of the subjects discussed in this thread) > > Our out-of-tree-target need several patches to get things working > correctly for us. > > We have introduced i24 and i40 types in ValueTypes/MachineValueTypes > (in addition to
2017 Sep 25
0
What should a truncating store do?
(Not sure if this exactly maps to “truncating store”, but I think it at least touches some of the subjects discussed in this thread) Our out-of-tree-target need several patches to get things working correctly for us. We have introduced i24 and i40 types in ValueTypes/MachineValueTypes (in addition to the normal pow-of-2 types). And we have vectors of those (v2i40, v4i40). And the byte size in our
2008 Dec 07
1
[LLVMdev] How to extract loop body into a new function?
False Alarm!! Still don't know how to do it! I am trying to write a transformation pass to extract a loop body into a function. For example: The Loop in question is: for (i2 = 0; i2 < LOOP_SIZE; i2++) { A[B[i2]] = 2 * B[i2]; } The IR for which is: bb13: ; preds = %bb13, %bb %i2.0.reg2mem.0 = phi i32 [ 0, %bb ], [ %indvar.next62, %bb13 ] ; <i32>
2009 Jul 20
1
Regression function lm() not giving proper results
* * Hi , Can anyone help me please with this problem?* * *CASE-I* all_raw_data_NAomitted is my data frame.It has columns with names i1 ,i2, i3,i4…, till i15.It has 291 rows actually ,couldn’t show here. The data frame looks like this:-- i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 2 2 2 2 2 2 2 2 2 2 2 1 2 2 3 2 3 2 2 2 2 3 2 2 3 3
2003 Sep 25
1
apply on a 4D array
I am trying to multiply a 3D array of 4x4x4 by the 4 3D arrays of a 4D array with dimensions 4x4x4x4 (the last dimension being the one that I want to split by). (4x4x4 array) > hiaAry , , a1 i1 i2 i3 i4 h1 9.5936098 6.001040 0.08772 0.3138600 h2 1.2003500 1.454570 2.79248 0.0000000 h3 0.1346500 0.201220 0.39256 0.5464000 h4 0.0109000 0.012270 0.16417 0.2766900 ,
2006 Nov 21
1
lme4 model with no fixed effects?
Crossed random effects: > lmer( y ~ (1 | i1) + (1|i2) ,data=dta) Linear mixed-effects model fit by REML Formula: y ~ (1 | i1) + (1 | i2) Data: dta AIC BIC logLik MLdeviance REMLdeviance 91.18 94.84 -42.59 85.2 85.18 Random effects: Groups Name Variance Std.Dev. i1 (Intercept) 0.068224 0.26120 i2 (Intercept) 0.463112