Displaying 20 results from an estimated 500 matches similar to: "time difference bug?"
2002 Jun 27
2
Fastest way to find the last index k such that x[k] < y in a sorted vector x?
Hi, I am trying to find the fastest way to
"find the last index k such that x[k] < y in a *sorted* vector x"
These are my two alternatives:
x <- sort(rnorm(1e4))
y <- 0.2
# Alt 1
k <- max(1, sum(x < y))
# Alt 2 "divide and conquer"
lastIndexLessThan <- function(x, y) {
k0 <- 1; k1 <- length(x)
while ((dk <- (k1 - k0)) >
2016 Oct 20
2
[AVX512BW] Nasty KAND issue
Hey guys,
I've hit a pretty nasty issue on SKX with ANDs of masks <= 4 bits.
In the IR, we represent a 4b vector mask as <4 x i1>. This assumes
that the storage container for this type is also 4b, but it's not. The
smallest mask register on SKX is 8b. This also implies that the
smallest load/store moves 8b.
We run into problems when we try to optimize ANDs (full test case
2018 Oct 17
3
pcie-expander-bus doesn't support pcie-pci-bridge and pcie-switch-upstream-port
In libvirt, I found pcie-expander-bus controller doesn't support
pcie-to-pci-bridge and pcie-switch-upstream-port.
Version: libvirt-4.9
# cat /tmp/c.xml
...
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-expander-bus'>
<model name='pxb-pcie'/>
2017 Jan 24
7
[X86][AVX512] RFC: make i1 illegal in the Codegen
Hi All,
AVX-512 introduced the K mask registers and masked operations which make a natural choice for legalizing vectors of i1's.
For example,
define <8 x i32> @foo(<8 x i32>%a, <8 x i32*> %p) {
%r = call <8 x i32> @llvm.masked.gather.v8i32(<8 x i32*> %p, i32 4, <8 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>,
2016 Oct 20
2
[AVX512BW] Nasty KAND issue
On Thu, Oct 20, 2016 at 12:05 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>> On Oct 20, 2016, at 8:54 AM, Cameron McInally via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> Hey guys,
>>
>> I've hit a pretty nasty issue on SKX with ANDs of masks <= 4 bits.
>>
>> In the IR, we represent a 4b vector mask as <4 x i1>.
2018 Oct 17
1
Re: pcie-expander-bus doesn't support pcie-pci-bridge and pcie-switch-upstream-port
On 10/17/2018 08:56 AM, Andrea Bolognani wrote:
> On Wed, 2018-10-17 at 10:50 +0800, Han Han wrote:
>> In libvirt, I found pcie-expander-bus controller doesn't support pcie-to-pci-bridge and pcie-switch-upstream-port.
> [...]
>> # virsh -k0 -K0 define /tmp/c.xml
> Aside: the -k and -K virsh options are documented as
>
> -k | --keepalive-interval=NUM
>
2006 Jun 07
1
knn - 10 fold cross validation
Hi,
I was trying to get the optimal 'k' for the knn. To do this I was using the following function :
knn.cvk <- function(datmat, cl, k = 2:9) {
datmatT <- (datmat)
cv.err <- cl.pred <- c()
for (i in k) {
newpre <- as.vector(knn.cv(datmatT, cl, k = i))
cl.pred <- cbind(cl.pred, newpre)
cv.err <- c(cv.err, sum(cl != newpre))
}
2012 May 15
2
Renaming names in R matrix
I have the following matrix:
> dat
[,1] [,2] [,3] [,4]
foo 0.7574657 0.2104075 0.02922241 0.002705617
foo 0.0000000 0.0000000 0.00000000 0.000000000
foo 0.0000000 0.0000000 0.00000000 0.000000000
foo 0.0000000 0.0000000 0.00000000 0.000000000
foo 0.0000000 0.0000000 0.00000000 0.000000000
foo 0.0000000 0.0000000 0.00000000 0.000000000
and given this:
2011 Aug 13
1
Own R function doubt
Hi to all the people again,
I was writting a simply function in R, and wish to collect the results in a
excel file. The work goes as follows,
Ciervos<-function(K1, K0, A, R,M,Pi,Hembras)
{B<-(K1-K0)/A
T1<-(R*Pi*Hembras-M*Pi+B)/(Pi-M*Pi+R*Pi*Hembras)
P1<-Pi-B
R1<-P1*Hembras*R
M1<-P1*M
T2<-(R1-M1+B)/(P1-M1+R1)
P2<-P1-B
R2<-P2*Hembras*R
M2<-P2*M
2016 Oct 20
2
[AVX512BW] Nasty KAND issue
On 10/20/2016 9:28 AM, Cameron McInally via llvm-dev wrote:
> I should have attached the generated asm to save some trouble.
> Apologies for that and attaching now...
>
>
>
> On Thu, Oct 20, 2016 at 12:26 PM, Cameron McInally
> <cameron.mcinally at nyu.edu> wrote:
>> On Thu, Oct 20, 2016 at 12:05 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
2017 Jul 01
2
KNL Assembly Code for Matrix Multiplication
Thank You,
It means vmovdqa64 zmm22, zmmword ptr [rip + .LCPI0_0] # zmm22 =
[8,9,10,11,12,13,14,15] zmm22 will contain 64 bit constant values which are
indexes here zmm22=8, 9, 10, 11, 12,13,14,15. not the values loaded from
these locations. and zmm2 contains constant 4000. so,
vpmuludq zmm14, zmm10, zmm2 ; will multiply the indexes values with 4000,
as for array b the stride is 4000.
zmm14=
2020 Jan 14
2
[R] choose(n, k) as n approaches k
> On 14 Jan 2020, at 16:21 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
> On 14/01/2020 10:07 a.m., peter dalgaard wrote:
>> Yep, that looks wrong (probably want to continue discussion over on R-devel)
>> I think the culprit is here (in src/nmath/choose.c)
>> if (k < k_small_max) {
>> int j;
>> if(n-k < k
2006 Apr 26
1
help using tapply
Dear R-mates,
# Here's what I am trying to do. I have a dataset like this:
id = c(rep(1,8), rep(2,8))
dur1 <- c( 17,18,19,18,24,19,24,24 )
est1 <- c( rep(1,5), rep(2,3) )
dur2 <- c(1,1,3,4,8,12,13,14)
est2 <- rep(1,8)
mydata = data.frame(id,
estat=c(est1, est2),
durat=c(dur1, dur2))
# I want to one have this:
id = c(rep(1,8), rep(2,8))
2020 Jan 14
4
[R] choose(n, k) as n approaches k
OK, I see what you mean. But in those cases, we don't get the catastrophic failures from the
if (k < 0) return 0.;
if (k == 0) return 1.;
/* else: k >= 1 */
part, because at that point k is sure to be integer, possibly after rounding.
It is when n-k is approximately but not exactly zero and we should return 1, that we either return 0 (negative case) or n
2016 Aug 25
3
invariant.load metadata semantics
I'm working on enhancing EarlyCSE to use MemorySSA and have come across
the following issue due to differences in EarlyCSE and MemorySSA's
handling of !invariant.load. EarlyCSE will *not* currently optimize the
following code by replacing %x2 with %x and removing the second load:
B1:
%x = load %p
clobber()
...
B2: // dominated by B1
%x2 = load %p
2020 Jan 15
1
[R] choose(n, k) as n approaches k
That crossed my mind too, but presumably someone designed choose() to handle the near-integer cases specially. Otherwise, we already have beta() -- you just need to remember what the connection is ;-).
I would expect that it has to do with the binomial and negative binomial distributions, but I can't offhand picture a calculation that leads to integer k, n plus/minus a tiny numerical error
2017 Jan 10
4
Default hashing function for integers (DenseMapInfo.h)
> On Jan 10, 2017, at 2:31 AM, Chris Lattner <sabre at nondot.org> wrote:
>
> As others have pointed out, 37 does have some nice properties (by being prime), but we’ve also had it from the very early days. I wouldn’t say that it has been extremely well considered at all.
>
> -Chris
Thanks for your reply. But I am not sure to understand the last sentence. Does it mean that
2012 Nov 21
1
Listing elements of a 4D array
Dear list,
I'm having trouble to see how my elements on a 4 dimensional array are
listed.
For example, I generated the following array:
junk.melt=melt(occ.data,id.var=c("Especie", "Site", "Rep", "Año"),
measure.var="Pres")
y=cast(junk.melt, Site ~ Rep ~ Especie ~ Año)
Now, I want to be able to look at how my species (Especie) are listed, in
2008 Jul 10
2
[PATCH] PV-GRUB: xfs support
PV-GRUB: xfs support
i386 doesn''t have PAE anyway.
Index: fsys_xfs.c
===================================================================
RCS file: /sources/grub/grub/stage2/fsys_xfs.c,v
retrieving revision 1.5
diff -u -p -r1.5 fsys_xfs.c
--- fsys_xfs.c 8 May 2005 02:18:14 -0000 1.5
+++ fsys_xfs.c 10 Jul 2008 13:09:50 -0000
@@ -101,7 +101,7 @@ static inline __const__ xfs_uint16_t
le16
2010 Mar 30
6
Error "singular gradient matrix at initial parameter estimates" in nls
I am using nls to fit a non linear function to some data.
The non linear function is:
y= 1- exp(-(k0+k1*p1+ .... + kn*pn))
I have chosen algorithm "port", with lower boundary is 0 for all of the
ki parameters, and I have tried many start values for the parameters ki
(including generating them at random).
If I fit the non linear function to the same data using an external