similar to: how to call function in ../src/main

Displaying 20 results from an estimated 100 matches similar to: "how to call function in ../src/main"

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
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?
2006 Aug 03
1
question about dll crashing R
I have ported some R code to C to make it faster. I can perform .Call("foobar",....) once and it works fine. Absolutely correct answer. If I put a loop inside foobar and run the main code routine more than 100 times, it crashes R. Or if I call .Call("foobar"....) seperately more than two tims it crashes R. For the most part I am doing matirx multiplies using EXP
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 <-
2019 Apr 05
2
patch to improve matrix conformability error message
With this patch, > A <- matrix(1, 2, 2) > B <- matrix(2, 3, 2) > A %*% B Error in A %*% B : non-conformable arguments of dimension (2, 2) and (3, 2) >From 205b591d4d14b5ff667325fb233a6deb08314726 Mon Sep 17 00:00:00 2001 From: Joshua Nathaniel Pritikin <jpritikin at pobox.com> Date: Fri, 5 Apr 2019 12:03:58 -0400 Subject: [PATCH] Improve non-conformable arguments error
2019 Apr 30
0
patch to improve matrix conformability error message
I think this is a good idea. Is there a reason why it got no interest? Slippery slope? Or maybe others were also just occupied trying to figure out how Joshua's second message had timestamp earlier than his first message? On Fri, Apr 05, 2019 at 12:05:36PM -0400, Joshua N Pritikin wrote: >With this patch, > >> A <- matrix(1, 2, 2) >> B <- matrix(2, 3, 2) >> A
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)
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.
2002 Apr 21
0
New R CGI gateway: TKU-Stat
Hi boys and girls, This is to let you know that I am writing a new R CGI gateway: TKU-Stat which has its page on http://tkustat.stat.tku.edu.tw (There is an "English" option on main menu) It's based on PHP language, but it's NOT a R <-> PHP API (I am not a good C programmer :( ) It's just a CGI. Basically, I use PHP and some template engine to get inputs/selections
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
1997 Nov 28
3
R-alpha: Problems with dimnames and names
This message is in MIME format --_=XFMail.1.1.p0.Linux:971128122615:3052=_ Content-Type: text/plain; charset=us-ascii I have rounded up three buglets in R-0.50-a4. Two of them I can fix and a patch is supplied below. I hope this is useful for the current source (if these haven't been fixed already :) 1) cov cov() fails when it's argument is a matrix with one column and with column names
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
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
2005 Mar 02
0
Still having trouble with slow opening of printer properties
List, I asked a while back about problems with very slow openings of printer properties windows. This afternoon our main internet link was upgraded to 6Mb (symmetric) and so I thought I might see some improvements in response. But no change. I really don't think it's the pipe that's at fault, there's something wrong with my samba configuration. When I open the properties of a
2013 Apr 25
1
lsfit: Error in formatting error message
Hi, in R-3.0 I get the following error when calling lsfit with more observations than variables, which seems to come from an error in the formatting of the error message (note that this was not happening in 2.15.3): > nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar), runif(nobs), intercept=FALSE) Error in sprintf(ngettext(nry, "%d response", "%d
2004 Dec 11
1
(no subject)
when I issue a command to populate my ldap directory I receive an erro cant find Net/SSleay.pm how can I find an Net:SSleay rpm to install on FC3 -------------- next part -------------- [root@matrix ~]# smbldap-populate Using builtin directory structure Can't locate Net/SSLeay.pm in @INC (@INC contains: /usr/local/sbin// /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5
2007 Dec 06
0
perl-net-DNS question
When trying to run a Perl program, I get this error (even though I have both Perl and perl-net-dns installed via yum) Can't locate Net/DNS.pm in @INC (@INC contains: /usr/lib/nagios/plugins /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
2007 Oct 26
2
perl question on CentOS
I'm trying to use nmap2nagios (a perl script) on CentOS, but when I run it, I get the following error: (If this is offtopic for this list, please let me know) ./nmap2nagios.pl -v -r /tmp/nmap.xml -o /tmp/new.cfg ./nmap2nagios.pl: line 9: use: command not found ./nmap2nagios.pl: line 10: use: command not found ./nmap2nagios.pl: line 11: use: command not found ./nmap2nagios.pl: line 14: use:
2005 Jul 06
3
asterisk perl radiusclient
hello how to solve these errors /var/lib/asterisk/agi-bin/agi-rad-auth.pl line 10 use Asterisk::AGI; vi /etc/asterisk/extensions.conf exten => _X.,1,agi,agi-rad-auth.pl|Routing=SIP&AuthorizeBy=SIP vi /etc/asterisk/modules.conf load => res_agi.so <---------------errors------------------------> *CLI> Can't locate Asterisk/AGI.pm in @INC (@INC contains:
2007 Feb 08
1
mod_perl and httpd2
I've got httpd and mod_perl installed, but I seem to have an application that requires part of mod_perl that doesn't seem to be properly installed into perl, notably, the 'Apache' portion. To 'fix' this, cpan would like to install either mod_perl-1.29, or alternatively to install mod_perl-2.0.2. 1.29 doesn't seem smart, and 2.0.2 absolutely will not install over the