similar to: NA %*% 0 == 0 (PR#4582)

Displaying 20 results from an estimated 3000 matches similar to: "NA %*% 0 == 0 (PR#4582)"

2006 Feb 22
2
How can I see how %*% is implemented?
I would like to see how the matrix multiplication operator %*% is implemented (because I want to see which external Fortran/C routines are used). How can I do so? Best S??ren
2017 Jan 07
2
accelerating matrix multiply
I am using R to multiply some large (30k x 30k double) matrices on a 64 core machine (xeon phi). I added some timers to src/main/array.c to see where the time is going. All of the time is being spent in the matprod function, most of that time is spent in dgemm. 15 seconds is in matprod in some code that is checking if there are NaNs. > system.time (C <- B %*% A) nancheck: wall time
2017 Jan 11
2
accelerating matrix multiply
> Do you have R code (including set.seed(.) if relevant) to show on how to generate > the large square matrices you've mentioned in the beginning? So we get to some > reproducible benchmarks? Hi Martin, Here is the program I used. I only generate 2 random numbers and reuse them to make the benchmark run faster. Let me know if there is something I can do to help--alternate
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)
2017 Jan 16
1
accelerating matrix multiply
Hi Tomas, Can you share the full code for your benchmark, compiler options, and performance results so that I can try to reproduce them? There are a lot of variables that can affect the results. Private email is fine if it is too much for the mailing list. I am measuring on Knight's Landing (KNL) that was released in November. KNL is not a co-processor so no offload is necessary. R executes
2004 Apr 16
1
as.data.frame.list (PR#6782)
Full_Name: J. R. M. Hosking Version: 1.9.0 OS: Windows 2000 Submission from: (NULL) (129.34.20.23) Browsing the code of as.data.frame.list, I see cn[m] <- paste("..adfl.", cn[m], sep = "") and 5 lines later names(x) <- sub("^..adfl.", "", names(x)) It looks as though the latter should be names(x) <- sub("^\\.\\.adfl\\.",
2004 Apr 16
2
type.convert (PR#6781)
Full_Name: J. R. M. Hosking Version: 1.9.0 OS: Windows 2000 Submission from: (NULL) (129.34.20.23) Two problems, perhaps related: (1) na.strings is not honored when x is non-numeric and as.is=T > type.convert( c("abc","-"), as.is=T, na.strings="-" ) [1] "abc" "-" ... unless x consists only of NAs > type.convert(
2011 Feb 20
2
Problem using F77_CALL(dgemm) in a package
Dear R-devel, I've written a numerical solver for SOCPs (second order cone programs) in R, and now I want to move most of the solver code into C for speed. I've written combined R/C packages before, but in this case I need to do matrix operations in my C code. As I have never done that before, I'm trying to write some simple examples to make sure I understand the basics. I am stuck
2017 Aug 21
3
Control multi-threading in standard matrix product
Dear R Core Team, I wish to report what can be viewed as a bug or at least a strange behavior in R-3.4.1. I ask my question here (as recommended on https://www.r-project.org/bugs.html) since I am not member of the R's Bugzilla. When running 'R --vanilla' from the command line, the standard matrix product is by default based on BLAS and multi-threaded on all cores available on
2017 Aug 21
2
Control multi-threading in standard matrix product
Hi Tomas, Thanks for your answer. Indeed, I checked and my R-3.4.1 installed from the ubuntu repository use 'libopenblasp-r0.2.18.so' while my R-3.3.2 that I did compiled on my machine use 'libRblas.so' which explain the difference of behavior. I will use RhpcBLASctl to avoid issue when combining matrix product and other multi-threading package. Maybe this point regarding
2001 Nov 09
1
Installing packages
Hello, I have upgraded from Mandrake Linux 8.0 to Mandrake 8.1 and try to reinstall my favourite R... Everything is OK for the base software but I have trouble to get some packages installed. Specifically, for some packages, a "collect2" binary seems to be necessary during the compilation/linking process of the library, and LD complains about not finding it : Installing source
2010 Aug 23
1
Internal state indicating if a data object has NAs/no NAs/not sure (Was: Re: Speeding up matrix multiplies)
Hi, I'm just following your messages the overhead that the code for dealing with possible NA/NaN values brings. When I was setting up part of the matrixStats package, I've also though about this. I was thinking of having an additional logical argument 'hasNA'/'has.na' where you as a user can specify whether there is NA/NaN:s or not, allowing the code to avoid it or not.
2010 Aug 23
1
Speeding up matrix multiplies
I've looked at the code for matrix multiplies in R, and found that it can speeded up quite a bit, for multiplies that are really vector dot products, and for other multiplies in which the result matrix is small. Here's my test program: u <- seq(0,1,length=1000) v <- seq(0,2,length=1000) A2 <- matrix(2.1,2,1000) A5 <- matrix(2.1,5,1000) B3 <- matrix(3.2,1000,3) A4 <-
2006 Jul 11
2
Dropping unused levels of a factor that has "NA" as a level
Is this a bug? > f1 <- factor(c("a", NA), levels = c("a", "NA") ) > f2 <- f1[, drop = TRUE] > f2 [1] a <NA> Levels: a <NA> I would have expected f2 to have only one level, "a". It seems to me that the code in [.factor does not follow the advice in help("factor") on how to set factor codes to be
2012 Nov 17
0
[LLVMdev] Purdue LLVM Social: GreyHouse 12/6 @ 8:30pm
Dr Hosking, interested in coming to this? Michael Goldfarb, interested in coming to this? -- Sean Silva On Sat, Nov 17, 2012 at 12:53 AM, Joe Abbey <jabbey at arxan.com> wrote: > First LLVM Social in West Lafayette, IN. > > When: > Thursday, Dec 6th @ 8:30pm > > Where: > GreyHouse Coffee > 100 Northwestern Avenue > West Lafayette, IN 47906 >
2001 Sep 19
1
missing() (PR#1096)
Full_Name: J. R. M. Hosking Version: 1.3.0 OS: Windows 2000 Submission from: (NULL) (198.81.209.16) R documentation suggests that if a function argument x is omitted, missing(x) should return TRUE even if x is subsequently assigned a value. This happens in S-plus. But in R: > test function(x){ print(missing(x)) if(missing(x)) x<-0 print(missing(x)) invisible() } > test() [1] TRUE [1]
2008 Jul 19
1
axis() ignores supplied value of argument mgp[3]?
It seems that when an argument 'mgp' is supplied to axis(), the mgp[2] value (position of tick mark labels) is honoured but the mgp[3] value (position of axis line) is ignored. Example: plot(1:5, xaxt='n', ann=FALSE) par(mgp=c(0,2,1)) axis(1, at=2:4, mgp=c(0,-2,-3)) Axis line is plotted at margin line 1, tick mark labels at line -3. Is this a bug? J. R. M. Hosking
2007 Feb 25
2
RFA
Dear Sir in the following example,is the vector lmom a l-moment ratios vector? What is meant by size = northCascades[,1]? And what are the values in c(0.0104,0.0399,0.0405)? Please help me I am unable to understand these from help manual. Best Regards AMINA data(northCascades) lmom <- c(1, 0.1103, 0.0279, 0.1366) kappaParam <- kappalmom(lmom) heterogeneity(500, 19, size =
2017 Jan 10
0
accelerating matrix multiply
>>>>> Cohn, Robert S <robert.s.cohn at intel.com> >>>>> on Sat, 7 Jan 2017 16:41:42 +0000 writes: > I am using R to multiply some large (30k x 30k double) > matrices on a 64 core machine (xeon phi). I added some timers > to src/main/array.c to see where the time is going. All of the > time is being spent in the matprod function, most of that
2017 Jan 16
0
accelerating matrix multiply
Hi Robert, thanks for the report and your suggestions how to make the NaN checks faster. Based on my experiments it seems that the "break" in the loop actually can have positive impact on performance even in the common case when we don't have NaNs. With gcc on linux (corei7), where isnan is inlined, the "break" version uses a conditional jump while the