search for: nr

Displaying 20 results from an estimated 2462 matches for "nr".

2015 Oct 10
3
[PATCH] nv50, nvc0: don't base decisions on available pushbuf space
.../nv50/nv50_shader_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c @@ -65,14 +65,9 @@ nv50_constbufs_validate(struct nv50_context *nv50) PUSH_DATA (push, (b << 12) | (i << 8) | p | 1); } while (words) { - unsigned nr; - - if (!PUSH_SPACE(push, 16)) - break; - nr = PUSH_AVAIL(push); - assert(nr >= 16); - nr = MIN2(MIN2(nr - 3, words), NV04_PFIFO_MAX_PACKET_LEN); + unsigned nr = MIN2(words, NV04_PFIFO_MAX_PACKET_LEN); +...
2015 Oct 10
2
[PATCH] nv50, nvc0: don't base decisions on available pushbuf space
...ers/nouveau/nv50/nv50_shader_state.c >> @@ -65,14 +65,9 @@ nv50_constbufs_validate(struct nv50_context *nv50) >> PUSH_DATA (push, (b << 12) | (i << 8) | p | 1); >> } >> while (words) { >> - unsigned nr; >> - >> - if (!PUSH_SPACE(push, 16)) >> - break; >> - nr = PUSH_AVAIL(push); >> - assert(nr >= 16); >> - nr = MIN2(MIN2(nr - 3, words), NV04_PFIFO_MAX_PACKET_LEN); >> +...
2005 Aug 21
1
Plan9 on xen
...m literally at the last step of the process, where I can create a new plan9 domain via xm. However, I get the following: $ xm create plan9 -c Using config file "/etc/xen/plan9". Started domain plan9, console on port 999 ************ REMOTE CONSOLE: CTRL-] TO QUIT ******** sdxenverify+0: nr 0 XENFE:find_dev_by_handle 0 np 802833dc np->dev 806e3630 There''s still a leak in vif_disconnect CONNECT: message sent. Set something to 0 just to see CONNECT: set it ===========> status changed! msg length 12 want 12 ===========> blkif_status_change to 1 XENFE:find_dev_by_handle...
2004 Apr 15
0
phyper accuracy and efficiency (PR#6772)
...answer is dhyper(0, 150, 150, 60, FALSE) which is 5.111204798e-22. phyper is also really slow for large arguments. Therefore, I suggest using the code below. This is a sniplet from Gnumeric, so you'll have to s/gnm_float/double/ and s/gnum//, etc. The code isn't perfect. In fact, if i*(NR+NB) is close to n*NR, then this code can take a while. Not longer than the old code, though. /* * New phyper implementation. Copyright 2004 Morten Welinder. * Distributed under the GNU General Public License. * * Thanks to Ian Smith for ideas. */ /* * Calculate * * phyper...
2008 Feb 22
0
[PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support.
...,59 @@ +#ifndef _ASM_IA64_SYNC_BITOPS_H +#define _ASM_IA64_SYNC_BITOPS_H + +/* + * Copyright 1992, Linus Torvalds. + * Heavily modified to provide guaranteed strong synchronisation + * when communicating with Xen or other guest OSes running on other CPUs. + */ + +static inline void sync_set_bit(int nr, volatile void *addr) +{ + set_bit(nr, addr); +} + +static inline void sync_clear_bit(int nr, volatile void *addr) +{ + clear_bit(nr, addr); +} + +static inline void sync_change_bit(int nr, volatile void *addr) +{ + change_bit(nr, addr); +} + +static inline int sync_test_and_set_bit(int nr, volatil...
2008 Feb 22
0
[PATCH 04/28] ia64/xen: introduce synch bitops which is necessary for ia64/xen support.
...,59 @@ +#ifndef _ASM_IA64_SYNC_BITOPS_H +#define _ASM_IA64_SYNC_BITOPS_H + +/* + * Copyright 1992, Linus Torvalds. + * Heavily modified to provide guaranteed strong synchronisation + * when communicating with Xen or other guest OSes running on other CPUs. + */ + +static inline void sync_set_bit(int nr, volatile void *addr) +{ + set_bit(nr, addr); +} + +static inline void sync_clear_bit(int nr, volatile void *addr) +{ + clear_bit(nr, addr); +} + +static inline void sync_change_bit(int nr, volatile void *addr) +{ + change_bit(nr, addr); +} + +static inline int sync_test_and_set_bit(int nr, volatil...
2012 Oct 16
2
Penalty function constrained optimization
...nfleets)) f<-1 f<-array(f,dim=c(nfleets)) f1<-f[1] f2<-f[2] init.eff<-array(8,dim=c(nfleets)) OF<-c(q*f) F<- sum(q*f) Z<-M+F Catch<-array(0,dim=c(nfleets)) obj<-function(f){ F <- q*f Z <- M+sum(F) S <- exp(-Z) Catch<- N*F/Z*(1-S) Tot.Catch <- sum(Catch) NR<-array(0,dim=c(nfleets)) NR<-Price*Catch - f*cost d.NR<-array(0,dim=c(nfleets)) d.NR<- N*q/Z*(1-S-F/Z+F/Z*S+F*S)*Price-cost +1000*(max(0,f-9))^2 return(sum(d.NR*d.NR))} zero.bnd <- rep.int(0, length(f)) opt.eff <- optim( init.eff, obj, method="L-BFGS-B", lower=zero.bnd...
2013 Jul 14
9
[LLVMdev] [PATCH] x86/asm: avoid mnemonics without type suffix
...x86/include/asm/percpu.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 6dfd019..6ed3d1e 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -67,7 +67,7 @@ set_bit(unsigned int nr, volatile unsigned long *addr) : "iq" ((u8)CONST_MASK(nr)) : "memory"); } else { - asm volatile(LOCK_PREFIX "bts %1,%0" + asm volatile(LOCK_PREFIX "btsl %1,%0" : BITOP_ADDR(addr) : "Ir" (nr) : "memory"); } } @@ -83,7 +83...
2009 Dec 04
3
[PATCH] nouveau: avoid running out of relocs
...veau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index b595405..28f483f 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h @@ -113,8 +113,10 @@ so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so) unsigned nr, i; nr = so->cur - so->push; - if (pb->remaining < nr) - nouveau_pushbuf_flush(chan, nr); + /* This will flush if we need space. + * We don't actually need the marker. + */ + nouveau_pushbuf_marker_emit(chan, nr, so->cur_reloc); pb->remaining -= nr; memcpy(pb->...
2020 Sep 11
4
Garbage collection of seemingly PROTECTed pairlist
...ToVectorList() at the end to make it into a regular list. I'm getting a strange garbage collection error. My PROTECTed pairlist prlst gets garbage collected away and causes a memory leak error when I try to access it. Here's my code. #include <Rinternals.h> SEXP C_int_mat_nth_row_nrnc(int *int_mat_int, int nr, int nc, int n) { SEXP out = PROTECT(Rf_allocVector(INTSXP, nc)); int *out_int = INTEGER(out); if (n <= 0 | n > nr) { for (int i = 0; i != nc; ++i) { out_int[i] = NA_INTEGER; } } else { for (int i = 0; i != nr; ++i) { out_int[i] = int...
2005 Jan 03
2
Memory Efficient Methods for Building Matrix
Dear List: I am having to build a block-diagonal matrix (vl) and am currently using the following code. I<-diag(sample.size) vl<-kronecker(I,vl.mat) This code works fine, but for large N, it is a huge memory hog. Is there a more efficient method for constructing vl? Thanks, Harold [[alternative HTML version deleted]]
2007 Jun 12
0
distribution graph
...lt;-max(xv) xn <- as.numeric(table(x1)) # number of occurences nx <- length(xv) maxn <- max(xn) plot(x=xplace[1]+(xv-minxv)*(xplace[2]-xplace[1])/ (maxxv-minxv),y=xv,xlab='',ylab='', axes=FALSE,col='white') box() axis(1,at=xplace[3],labels=xlab) axis(2) for (value.nr in 1:nx) { n.act <- xn[value.nr] if (n.act==1) xpositions.act <- xplace[3] if (n.act > 1) { halfband.act <- halfband * n.act/maxn left.act <- xplace[3] - halfband.act right.act <- xplace[3] + halfband.act xpositions.act <- left.act + (0:(n.act-1)) * (right.act - left.act)/(n...
2009 Aug 24
6
Combining matrices
If I have two matrices like x <- matrix(rep(c(1,2,3),3),3) y <- matrix(rep(c(4,5,6),3),3) How can I combine them to get ? 1 1 1 4 4 4 1 1 1 5 5 5 1 1 1 6 6 6 2 2 2 4 4 4 2 2 2 5 5 5 2 2 2 6 6 6 3 3 3 4 4 4 3 3 3 5 5 5 3 3 3 6 6 6 The number of rows and the actual numbers above are unimportant, they are given so as to illustrate how I want to combine the matrices. I.e., I am looking for
2013 Sep 12
4
on how to make a skip-table
I've got two data frames, as shown below: (NR means Number of Record) > record.lenths NR length 1 100 2 130 3 150 4 148 5 100 6 83 7 60 > valida.records NR factor 1 3 2 4 4 8 7 9 And I intend...
2006 Feb 21
2
ActiveRecord before_ callbacks question
...del and postgres table to something different than id. View Edit and such works in the scaffolded controller. However if I click in the controller below the list of data onto New then I get an error message like this: Showing app/views/admin/_form.rhtml where line #5 raised: undefined method `nr_before_type_cast'' for #<Adressen:0x40aa6e8c> Extracted source (around line #5): 2: 3: <!--[form:adressen]--> 4: <p><label for="adressen_nr">Nr</label><br/> 5: <%= text_field ''adressen'', ''nr'' %></p...
2008 Apr 21
3
means and variances of several groups in the matrix
Dear R users, I have 32 observations in data x. After sorting this, I want to compute means and variances of 3 groups divided by "nr". Actually, the number of groups is flexible. Any suggestion will be greatly appreciated. Kathryn Lord --------------------------------------------------------------------------- x=rnorm(32) y=sort(x) nr=matrix(c(12,11,10,10,10,11),2,3) > nr [,1] [,2] [,3] [1,] 12 10 10...
2012 Sep 26
3
Removing duplicates without a for loop
I have several thousand rows of shipment data imported into R as a data frame, with two columns of particular interest, col 1 is the entry date, and col 2 is the tracking number (colname is REQ.NR). Tracking numbers should be unique but on occassion aren't because they get entered more than once. This creates two or more rows of with the same tracking number but different dates. I wrote a for loop that will keep the row with the oldest date but it is extremely slow. Any suggestions of...
2005 Jan 21
6
Avoiding a Loop?
...s, I have a matrix where the first column is known. The second column is the result of multiplying this first column with a constant "const". The third column is the result of multiplying the second column with "const"..... So far, I did it like this (as a simplified example): nr.of.columns <- 4 myconstant <- 27.5 mymatrix <- matrix(numeric(0), nrow=5, ncol=nr.of.columns) mymatrix[,1] <- 1:5 for (i in 2:nr.of.columns) { mymatrix[,i] <- myconstant * mymatrix[,i-1] } Can anyone give me some advice whether it is possible to avoid this loop (and if yes: ho...
2010 Apr 26
2
Never executing loop in smallft.c
...rbis code and found a strange fragment in smallft.c: 38 static void drfti1(int n, float *wa, int *ifac){ 39 static int ntryh[4] = { 4,2,3,5 }; 40 static float tpi = 6.28318530717958648f; 41 float arg,argh,argld,fi; 42 int ntry=0,i,j=-1; 43 int k1, l1, l2, ib; 44 int ld, ii, ip, is, nq, nr; 45 int ido, ipm, nfm1; 46 int nl=n; 47 int nf=0; 48 49 L101: 50 j++; 51 if (j < 4) 52 ntry=ntryh[j]; 53 else 54 ntry+=2; 55 56 L104: 57 nq=nl/ntry; 58 nr=nl-ntry*nq; 59 if (nr!=0) goto L101; ... As far as I can see, nr will always be 0, witch means that j will be also...
2013 Jul 14
0
[LLVMdev] [PATCH] x86/asm: avoid mnemonics without type suffix
...gt; 2 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h > index 6dfd019..6ed3d1e 100644 > --- a/arch/x86/include/asm/bitops.h > +++ b/arch/x86/include/asm/bitops.h > @@ -67,7 +67,7 @@ set_bit(unsigned int nr, volatile unsigned long *addr) > : "iq" ((u8)CONST_MASK(nr)) > : "memory"); > } else { > - asm volatile(LOCK_PREFIX "bts %1,%0" > + asm volatile(LOCK_PREFIX "btsl %1,%0" > : BITOP_ADDR(addr) : "Ir" (nr) : "memo...