search for: size1

Displaying 20 results from an estimated 31 matches for "size1".

Did you mean: size
2018 Jul 20
1
[PATCH 2/2] Fix safe_realloc_add_2op_() to free memory when reallocation fails
...ude/share/alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/share/alloc.h b/include/share/alloc.h index 914de9ba..63878db0 100644 --- a/include/share/alloc.h +++ b/include/share/alloc.h @@ -168,7 +168,7 @@ static inline void *safe_realloc_add_2op_(void *ptr, size_t size1, size_t size2) free(ptr); return 0; } - return realloc(ptr, size2); + return safe_realloc_(ptr, size2); } static inline void *safe_realloc_add_3op_(void *ptr, size_t size1, size_t size2, size_t size3) -- 2.17.1
2013 Feb 18
1
ggplot2 and facet_wrap help
Dear R experts, I am trying to arrange multiple plots, creating one graph for each size1 factor variable in my data frame, and each plot has the median price on the y-axis and the size2 on the x-axis grouped by clarity: library(ggplot2) df <- data.frame(price=matrix(sample(1:1000, 100, replace = TRUE), ncol = 1)) df$size1 = 1:nrow(df) df$size1 = cut(df$size1, breaks=11) df=df[sam...
2009 Sep 21
2
cox memory
...i there, I have a rather large data set and perform the following cox model: test1 <- list(tstart,tstop,death1,chemo1,radio1,horm1) out1<-coxph( Surv(tstart,tstop, death1) ~ chemo1+chemo1:log(tstop+1)+horm1+horm1:log(tstop+1)+age1+grade1+grade1:log(tstop+1)+positive1+positive1:log(tstop+1)+size1+size1:log(tstop+1), test1) out1 Up to here everything works fine (with each covariate having a length of 289205) Now I want to see a specific profile of the above model so I ask for: x11() profilbig2=(survfit(out1,newdata=data.frame(chemo1=rep(0,length(chemo1)),horm1=rep(0,length(chemo1)),age1=r...
2003 Jun 30
1
symbol size on a plot
Hi, I would like to get from a plot the size of the symbols plotted. Imagine I have the following plot function : plot(1:2,1:2, pch=15, cex=4) I would like the get the values SIZE1 and SIZE2 so that if I plot the following rectangle : rect(1.5,1.5, 1.5+SIZE1, 1.5+SIZE2) then the size of this square is exactely the same as the one of the symbols that have been plotted. Thanks for any idea. -- -------------------------------------------------- Philippe Hup? Institut Curie...
2012 Jun 24
3
Patch for cross compilation with MinGW32
...functional programs. kind regards, Christoph Terasa -------------- next part -------------- diff --git include/share/alloc.h include/share/alloc.h index 7aa17f7..3f2f2c7 100644 --- include/share/alloc.h +++ include/share/alloc.h @@ -110,7 +110,14 @@ static inline void *safe_malloc_add_4op_(size_t size1, size_t size2, size_t size return safe_malloc_(size4); } -void *safe_malloc_mul_2op_(size_t size1, size_t size2) ; +static inline void *safe_malloc_mul_2op_(size_t size1, size_t size2) +{ + if(!size1 || !size2) + return malloc(1); /* malloc(0) is undefined; FLAC src convention is to always al...
2011 Sep 12
1
nested anova<-R chrashing
...t==30,30, ifelse(plant==31,31,ifelse(plant==32,32,ifelse(plant==33,33,ifelse(plant==34,34,ifelse(plant==35,35,ifelse(plant==36,36, ifelse(plant==37,37,ifelse(plant==38,38,ifelse(plant==39,39,ifelse(plant==40,40,ifelse(plant==41,41,ifelse(plant==42,42,43))))))))))))))))))))))))))))))))))))))))))) size1<-as.factor(ifelse(size==5,1,ifelse(size==15,2,3))) position1<-as.factor(ifelse(position==1,1,ifelse(position==2,2,ifelse(position==3,3, ifelse(position==4,4,ifelse(position==5,5,ifelse(position==6,6,ifelse(position==7,7, ifelse(position==8,8,ifelse(position==9,9,ifelse(position==10,10,ifel...
2013 Feb 03
1
Fractional logit in GLM?
Hi, Does anyone know of a function in R that can handle a fractional variable as the dependent variable? The catch is that the function has to be inclusive of 0 and 1, which betareg() does not. It seems like GLM might be able to handle the fractional logit model, but I can't figure it out. How do you format GLM to do so? Best, Rachael [[alternative HTML version deleted]]
2018 Jan 26
4
[RFC] Improving compact x86-64 compact unwind descriptors
...of the extended compact unwind quadword for use in combination with MODE = 10 in the lower part. | 63                       48 47 46             40 39            32 | |-------------------------------------------------------------------| | RESERVED                   |  |  PROLOGUE-SIZE2 |  PROLOGUE-SIZE1 | |-------------------------------------------------------------------| Except for the MODE, the lower part is exactly like it would be for MODE = 2. PROLOGUE-SIZE1 is the length in bytes of the first part of the prologue relative to the STARTING-ADDRESS, up to and including the instruction that...
2018 Jan 27
0
[RFC] Improving compact x86-64 compact unwind descriptors
...nwind > quadword for use in combination with MODE = 10 in the lower part. > > | 63 48 47 46 40 39 32 | > |-------------------------------------------------------------------| > | RESERVED | | PROLOGUE-SIZE2 | PROLOGUE-SIZE1 | > |-------------------------------------------------------------------| > > > Except for the MODE, the lower part is exactly like it would be for MODE > = 2. > > PROLOGUE-SIZE1 is the length in bytes of the first part of the prologue > relative to the > STARTING-ADDR...
2018 Jan 29
2
[RFC] Improving compact x86-64 compact unwind descriptors
...for use in combination with MODE = 10 in the lower part. > > > > | 63 48 47 46 40 39 32 | > > |-------------------------------------------------------------------| > > | RESERVED | | PROLOGUE-SIZE2 | PROLOGUE-SIZE1 | > > |-------------------------------------------------------------------| > > > > > > Except for the MODE, the lower part is exactly like it would be for MODE > > = 2. > > > > PROLOGUE-SIZE1 is the length in bytes of the first part of the prologue > &g...
2017 Dec 31
1
Order of methods for optimx
...78630363601, ?????????????????????????????????? 4.94764539004454, ?????????????????????????????????? 129.606771856887, ?????????????????????????????????? -0.323749593604171, ?????????????????????????????????? 1.37326091618759), ???????????????????????????????? .Names = c("mu1", "size1", "mu2", ??????????????????????????????????????????? "size2", "p", "OTN")), ???????????????? method = c("Nelder-Mead", "BFGS"), ???????????????? data=ECFOCF_2002, hessian = TRUE) ) sbn <- system.time( ? o_mu2p1_bn <- fitCF(p...
2018 Jan 27
0
[RFC] Improving compact x86-64 compact unwind descriptors
...nwind > quadword for use in combination with MODE = 10 in the lower part. > > | 63 48 47 46 40 39 32 | > |-------------------------------------------------------------------| > | RESERVED | | PROLOGUE-SIZE2 | PROLOGUE-SIZE1 | > |-------------------------------------------------------------------| > > > Except for the MODE, the lower part is exactly like it would be for MODE > = 2. > > PROLOGUE-SIZE1 is the length in bytes of the first part of the prologue > relative to the > STARTING-ADDR...
2010 Apr 10
3
[PATCH 1/3] fbmem: fix aperture overlapping check
...41f2e5e 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1468,15 +1468,25 @@ static int fb_check_foreignness(struct fb_info *fi) return 0; } +/** + * ranges_overlap - check whether two ranges overlap (their intersection is not empty) + * @start1: start of the first range + * @size1: length of the first range + * @start2: start of the second range + * @size2: length of the second range + */ +#define ranges_overlap(start1, size1, start2, size2) ({ \ + typeof(start1) __start1 = (start1); \ + typeof(size1) __size1 = (size1); \ + typeof(start2) __start2 = (start2); \ + type...
2018 Jul 18
3
Behavior of safe_realloc_add_2op_()
I'm looking at an issue reported by the Coverity static analyzer. In iconvert() in src/share/utf8/iconvert.c on line 152 there is newbuf = safe_realloc_add_2op_(utfbuf, ...); If the request size is not valid, the function will free utfbuf and return 0. This is followed by goto fail and utfbuf is freed for the second time. A simply fix would be to set utfbuf to 0 if newbuf is 0. However, this
2012 Nov 09
3
Crash - cause 'memory not mapped'
...; #include <opencv/cv.h> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv/highgui.h> #include <opencv/cv.h> #include <R.h> #include <Rinternals.h> #include <Rmath.h> extern "C" { SEXP FiltroGaus(SEXP size1_r, SEXP size2_r, SEXP sigma_r) { int size1 = INTEGER(size1_r)[0]; int size2 = INTEGER(size2_r)[0]; double sigma = REAL(sigma_r)[0]; } } The compilation go without errors but when in R i type .C("FiltroGaus",3,3,2) the message is: Errore: INTEGER() can only be applied t...
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...<< "List of GEPs:\n"; for(std::list<GetElementPtrInst* >::iterator itGep1 = geps.begin(); itGep1 != geps.end(); itGep1++){ GetElementPtrInst *gep1 = *itGep1; Type *t1 = ((PointerType *)gep1->getType())->getElementType(); int64_t size1 = TD.getTypeAllocSize(t1); std::list<GetElementPtrInst* >::iterator itGep2 = itGep1; for(; itGep2 != geps.end(); itGep2++){ GetElementPtrInst *gep2 = *itGep2; gep1->dump(); errs() << "-->"; gep2->dump();...
2003 Apr 28
1
Red Hat 9 regex symbol conflict
.../ ! static int re_search (bufp, string, size, startpos, range, regs) struct re_pattern_buffer *bufp; const char *string; *************** *** 3577,3583 **** found, -1 if no match, or -2 if error (such as failure stack overflow). */ ! int re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; --- 3577,3583 ---- found, -1 if no match, or -2 if error (such as failure stack overflow). */ ! static int re_search_2 (bufp, string1, size1, string2, size2, st...
2006 Dec 19
3
[LLVMdev] alias-aware scheduling
...t;(Base) || + isa<ConstantPoolSDNode>(Base) || + isa<GlobalAddressSDNode>(Base); + } + + /* FIXME: copied from DAGCombiner.cpp */ + /// isAlias - Return true if there is any possibility that the two addresses + /// overlap. + bool isAlias(SDOperand Ptr1, int64_t Size1, + const Value *SrcValue1, int SrcValueOffset1, + SDOperand Ptr2, int64_t Size2, + const Value *SrcValue2, int SrcValueOffset2) + { + // If they are the same then they must be aliases. + if (Ptr1 == Ptr2) return true; + + // Gather base node and...
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The input C code is very simple: void foo(int *a, int *b) { for(int i=0; i<10; i++) b[i] = a[i]*a[i]; } int main() { int a[10]; int b[10]; for(int i=0; i<10; i++) a[i] = i; foo(a,b); return 0; } Obviously, for "foo", it only reads from array "a" and only writes to array
2011 Jun 03
2
Arules: R Crashes when running eclat with tidLists=TRUE
...------------------------------------------- Item Set Report Function ----------------------------------------------------------------------*/ static void _report_R (int *ids, int cnt, int supp, int *tal, void *data) { (...) if (flags & OF_LIST) { vec1 = (int*)realloc(ruleset->trnb, size1 *sizeof(int)); if (!vec1) { if (vec) free(vec); if (vec2) free(vec2); _cleanup(); error(msg(E_NOMEM));} ruleset->trnb = vec1; } (...) if (flags & OF_LIST) { /* if to list the transactions, */ h = ruleset->trtotal; if (supp < 0) {...