similar to: The best way to use R's linear algebra functions from C

Displaying 20 results from an estimated 2000 matches similar to: "The best way to use R's linear algebra functions from C"

2014 Jul 19
0
Fwd: Re: demote DC
Hi Marc, Thanks for your reply. On 18/07/2014 21:19, Marc Muehlfeld wrote: > Hello Fernando, > > Am 18.07.2014 20:14, schrieb Fernando Rodriguez: >> I am having a problem while demoting a DC. >> >> The DC i want to demotes is still online. When i try to use the command >> samba-tool domain demote this is the message i get: >> >> root at
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 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 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
2020 Feb 17
1
NA in doc for options(matprod="default")
Le 17/02/2020 ? 17:50, Tomas Kalibera a ?crit?: > On 2/17/20 5:36 PM, Serguei Sokol wrote: >> Hi, >> >> A colleague of mine has spotted me a passage of the doc ?option >> talking about Inf and NaN check in 'matprod=default' section: >> https://stat.ethz.ch/R-manual/R-devel/library/base/html/options.html >> >> I am wondering if NA should be
2006 Mar 09
0
When calling external C-function repeatedly I get different results; can't figure out why..
Dear all, I need to calculate tr(xyxy) fast for matrices x and y. Inspired by the R-source code, I've created the following functions (I am *new* to writing external C-functions, so feel free to laugh at my code - or, perhaps, suggest changes): #include <Rinternals.h> #include <R_ext/Applic.h> /* for dgemm */ static void matprod(double *x, int nrx, int ncx, double *y, int
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
2006 Mar 09
0
When calling external C-function repeatedly I get differentresults; can't figure out why..
Not an expert in programming either, but to me it seems like you've forgotten to initialize the variable "tr". It just picks up garbage from allocated memory previously initialized by other processes. Med venlig hilsen Frede Aakmann T?gersen > -----Oprindelig meddelelse----- > Fra: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] P?
2010 Sep 03
0
Pointer to fourteen patches to speed up R
I've continued to work on speeding up R, and now have a collection of fourteen patches, some of which speed up particular functions, and some of which reduce general interpretive overhead. The total speed improvement from these patches is substantial. It varies a lot from one R program to the next, of course, and probably from one machine to the next, but speedups of 25% can be expected in
2010 Sep 29
0
getDLLVersion
Hi, I'm just learning to write R extensions in C and to embed R in C. I was trying to get through the example in the help page on calling the .dll directly ( http://cran.r-project.org/doc/manuals/R-exts.html#Calling-R_002edll-directly ). When I compile I consistently get the error that getDLLVersion() as well as get_R_HOME() and getRUser() are undefined references. These are defined in
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
2016 May 18
0
Latest R-devel build failing on OS X
Yes, the nightly build is broken in a similar, but different way. See below. Both seem to be readline related, so Frederick Eaton's patches, which Martin committed yesterday are the likely culprit. I had actually tested them and things seemed to work, but it was on a different machine and not a completely clean build. -pd ..... ranlib: file: libR.a(printf.o) has no symbols gcc
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
2010 Aug 03
1
License for Rembedded.h
Possibly more of a legal question than a technical development question, but here goes. In the doc\COPYRIGHTS file it is made clear that the intention is that you can write R packages and distribute them under licenses not compatible with GPL, by making the relevant header files available under the LGPL. This was an explicit change that was made in February 2001, and allows for DLLs that
2006 Jun 27
1
Very slow read.table on Linux, compared to Win2000
Dear all, I read.table a 17MB tabulator separated table with 483 variables(mostly numeric) and 15000 observations into R. This takes a few seconds with R 2.3.1 on windows 2000, but it takes several minutes on my Linux machine. The linux machine is Ubuntu 6.06, 256 MR RAM, Athlon 1600 processor. The windows hardware is better (Pentium 4, 512 RAM), but it shouldn't make such a difference.
2020 Feb 17
2
NA in doc for options(matprod="default")
Hi, A colleague of mine has spotted me a passage of the doc ?option talking about Inf and NaN check in 'matprod=default' section: https://stat.ethz.ch/R-manual/R-devel/library/base/html/options.html I am wondering if NA should be mentioned too as the check seems to include this "value" too. NA being different from Inf and NaN it is worth mentioning, isn't it? Best,
2010 Jul 02
4
Some questions about R's modelling algebra
Hi all, In preparation for teaching a class next week, I've been reviewing R's standard modelling algebra. I've used it for a long time and have a pretty good intuitive feel for how it works, but would like to understand more of the technical details. The best (online) reference I've found so far is the section in "An Introduction to R"
2012 Mar 05
0
[LLVMdev] LLVM for automatic differentiation or linear algebra?
Dear all, I am the author of an open-source package for mathematical optimization and automatic differentiation called CasADi (www.casadi.org) and have recently started realize the potential of the LLVM project. At the core of CasADi are two fast interpretors for mathematical expressions and I'm now planning to complement these with JIT-compilation using LLVM. Does anyone know if there is
2016 May 18
2
Latest R-devel build failing on OS X
Dear R-devel, The latest version of R-devel (05-17) is throwing an error for me when building on OS X (v 10.11.4): making Rembedded.d from Rembedded.c making dynload.d from dynload.c making system.d from system.c making sys-unix.d from sys-unix.c making sys-std.d from sys-std.c making X11.d from X11.c clang -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H
2008 Apr 05
2
Adding a Matrix Exponentiation Operator
Hi all I recently started to write a matrix exponentiation operator for R (by adding a new operator definition to names.c, and adding the following code to arrays.c). It is not finished yet, but I would like to solicit some comments, as there are a few areas of R's internals that I am still feeling my way around. Firstly: 1) Would there be interest in adding a new operator %^% that performs