Displaying 20 results from an estimated 10000 matches similar to: "Passing single precision arrays to legacy code"
2010 Sep 16
2
problem reading Matlab file into R
Hi,
I'm trying to read a .mat file into R (2.11.1) with medium success so far. The file I have is a MATLAB 5.0 MAT-file exported from RiverSurveyor LIVE software (http://www.sontek.com/software.php). I have R.matlab and Rcompression installed and readMat() starts reading the file, as can be seen in verbose mode (hence medium success), but then gives the following error:
Error in dim(matrix)
2011 Jul 18
1
Manipulating single-precision (float) arrays in .Call functions
I am writing a wrapper function in C++ that calls a GPU kernel. My array type
for the GPU kernel is float, so I would like my wrapper function to receive
float arrays from R. I understand that I can use 'as.single' in R to copy a
double-precision vector from R in single-precision format while using the
'.C' interface, but is there any way to do something similar for
2001 Nov 29
0
memory: as.single in .Fortran creates another double
Hi, everyone.
As mentioned in my message of earlier today, I'm trying to do hierarchical
clustering on a data set that's probably too big. I may have to take a
subset eventually, but I'm spending a little time trying to try to reduce
memory use in the hope that I'll manage to do the full set.
One thing that occurred to me was to modify the underlying fortran code
(hclust.f, from
2012 Oct 23
0
Between single/dup and raid1/raid1
Hello,
today I wanted to remove one drive from raid1, and people at #btrfs advised me
to use ''-dconvert=single'' before ''btrfs device delete''.
I thought of adding ''-mconvert=dup'' too, but the kernel does not let me do that.
It looks like ''dup'' is disallowed for an array of multiple devices. So, to go
back to a single-drive
2004 Oct 08
3
Bug with png() and plot(type="n") (PR#7270)
Full_Name: Allen McIntosh
Version: 2.0.0
OS: Linux
Submission from: (NULL) (67.80.175.118)
Observed the bug with the following combinations: (RedHat 7.3, R 1.6.0) (RedHat
7.3, R 1.9.1) (Redhat 9, R2.0.0).
In the second plot (.png file) produced by the following sequence:
png(file="x%d.png")
plot(1:10,1:10,main="ooo",type="n")
segments(1:9,1:9,2:10,1:9)
2002 Apr 29
1
SSH client, dup, pty.
Hey,
I am hoping that some one on this list may be able to help me.
I started investigate the possibility of forking a process, the child then
attach to a pty, dup std[in|out] to the pty, then exec the ssh client.
For some reason, the ssh client still prompted straight to stdin and
stdout rather than through the pty that I created.
There seem to be a few issues with this. Can someone tell
2007 Aug 17
2
Overriding S4 methods in an installed package
Is it possible to override S4 methods in an installed package?
The naive
library("pkg")
setMethod("foo", signature(obj = "bar"),
function(obj , x, y) { new definition }
, where="package:pkg")
results in the error
Error in setMethod("foo", signature(obj = "bar"), function(obj, :
the environment "pkg" is
2004 Sep 17
1
Problem with R-1.9.1 under Solaris 2.6
Hi
I have installed R-1.9.1 on an 6 year old Sun running Solaris 2.6. After some initial failures to compile I used the :
gcc 2.7.2.3
f77
compilers with gnu make. [could not get gcc 3.4.1 to compile]
All but one of the .c programs compiled [that being src/main/connections.c which I manually compiled using cc] and the
make check
tests all worked [apart from the internet].
However I get the
2014 Jun 19
1
[PATCH] nouveau: dup fd before passing it to device
nouveau screens are reused for the same device node. However in the
scenario where we create screen 1, screen 2, and then delete screen 1,
the surrounding code might also close the original device node. To
protect against this, dup the fd and use the dup'd fd in the
nouveau_device. Also tell the nouveau_device that it is the owner of the
fd so that it will be closed on destruction.
Also make
2013 Dec 15
9
btrfs balance on single device
Hey all,
Just did a btrfs balance on a single device. Before the balance
operation here is the df result:
inglor@tiamat ~$ btrfs fi df /home
Data: total=19.19GB, used=9.34GB
System, DUP: total=32.00MB, used=4.00KB
Metadata, DUP: total=896.00MB, used=227.98MB
Then I issues a balance operation relocating the chunks across a single device:
inglor@tiamat ~$ sudo btrfs fi balance /home
[sudo]
2009 Mar 30
1
what is R equivalent of Fortran DOUBLE PRECISION ?
I noticed taht R cannot understand certain Fortran real constant formats. For instance:
c14 <- as.double( 7.785205408500864D-02)
Error: unexpected symbol in " c14 <- as.double( 7.785205408500864D"
The above "D" is used in Fortran language to indicate the memory starage mode. That is for instructing Fortran compiler
to store such a REAL constant in DOUBLE
2011 Nov 02
1
can one modify array in R memory from C++ without copying it?
Hi, guys. I posted this by accident at rcpp-dev, although it meant to
be only to r-dev, so don't flame me here please, rcpp guys will
do it there, i am sure :).
I have some pretty large arrays in R and i wanted to do some time
consuming modifications of these arrays in C++ without actually copying
them, just by passing pointers to them. Since i don't know internal data
structures of R, i
2004 Oct 28
2
POSIX time anomaly (PR#7317)
Full_Name: Allen McIntosh
Version: 2.0.0
OS: RedHat 9.0
Submission from: (NULL) (67.80.175.118)
The POSIX time printing routine gives strange results when asked to print a time
that is exactly midnight:
TZ=CST6CDT R -q --no-save
> strptime("10/5/2004 00:00:01 CDT", "%m/%d/%Y %H:%M:%S %Z")
[1] "2004-10-05 00:00:01"
> strptime("10/5/2004 00:00:00
2010 Jun 27
2
floating point in single precision
Hello,
is there a possibilty in R to convert numbers (double precision, 64bit) into
single precision ones (32bit).
I need that for compatibility reasons. Until now I call a C application which
casts a double to a float.
float precision32(double value) {
return (float)value;
}
But I want to use a R only method. What can I do?
Kind regards,
Sebastian
1999 Aug 30
1
Single precision
I am trying to port a huge Fortran routine that has been written
using type Real (single precision) instead of Real*8. R works only with
double precision and I got absurd results when calling the routine. Is
it possible to make it work properly without changing the source code?
I am running V0.64.1 of R for Unix.
Thanks
--------------------------
Carlos Corral van Damme
GNSS Unit, GMV
2011 Sep 07
1
storage and single-precision
I'm getting the impression from on-line docs that R cannot work with
single-precision floating-point numbers, but that it has a pseudo-mode for
single precision for communication with external programs.
I don't mind that R is using doubles internally, but what about storage?
If all I need to store is single-precision (32-bit), can I do that? When
it is read back into R it can be
2014 Aug 27
1
working with huge memory: single precision?
Hello,
I'm very new to R and don't know much about it yet. I would like
to develop R-programs that work with data of sizes of 10^10 - 10^11
data points. We have very-high-memory machines with ~256 GB, but it
would significantly help if I could store the data points in single
precision in RAM instead of double precision. Is that possible?
In the documentation I found a sentence saying its
2006 Sep 27
2
Single Precision (4 byte) floats with readBin
I would like to use readBin to read a binary data
file. Most of the data is 4-byte floating point but,
for some reason, only double precision appears to be
offered. I tried
fVariable=readBin(iFile,what=single());
and got 35.87879 which looks believable except that
the correct value is 3.030303. I then tried
fVariable=readBin(iFile,what=single(),4);
and got
[1] 3.831111e+10 6.657199e+10
2012 May 11
0
[patch] Behavior of .C() and .Fortran() when given double(0) or integer(0) (repost).
Dear R-devel,
Duncan Murdoch suggested that I repost this if I don't get a response in
a week, so here it is. The tests and the patches were on/against
revision 59314, but I don't think that any of the commits since then
affected the code in question.
While tracking down some hard-to-reproduce bugs in a package I maintain,
I stumbled on a behavior change between R 2.15.0 and the current
2001 Mar 22
1
lazy evaluation and DUP=F
I am having some difficulty understanding the implication of lazy evaluation mixed
with DUP=F in a .Fortran call. In qr.qty from base DUP is not used as an argument so
defaults to T. I am calling qr.qty with a very large array and would like to set
DUP=F in the .Fortran call so that qr.qty would be defined as copied below. Is there
some risk that a variable used as the argument in the original