Displaying 20 results from an estimated 1000 matches similar to: "Implementating streams in R"
2002 Apr 09
1
Fortran (77) in R
Hi,
I'm learning Fortran and trying to load a Fortran subroutine into R.
I've done:
R SHLIB Fibonacci.f
and it compiled fine.
Then I went into R and done:
> dyn.load("Fibonacci.so")
> Fib <- function(n) {
+ .Fortran("Fibonacci",
+ as.integer(n))[[1]]
+ }
> Fib(5)
Error in .Fortran("Fibonacci", as.integer(n)) :
2007 Sep 05
2
[LLVMdev] Seeing a crash with ConstantFP::get
Hola LLVMers,
I'm getting a crash when using ConstantFP::get.
I can repro it by adding one line to the Fibonacci example program:
int main(int argc, char **argv) {
int n = argc > 1 ? atol(argv[1]) : 24;
// Create some module to put our function into it.
Module *M = new Module("test");
// We are about to create the "fib" function:
Function
2011 Apr 20
5
Fibonacci
Hi!
I am trying to work out the code to get a Fibonacci sequence, using the
while() loop and only one variable. And I can't figure it out.
Fibonacci<-c(1,1)
while (max(Fibonacci)<500){
Fibonacci<-c(Fibonacci, (max(Fibonacci) + ?(Fibanacci)))
}
How can I tell R to take the value one before the max value? (Without
defining another variable)
(Probably super easy... I am a
2007 Sep 05
0
[LLVMdev] Seeing a crash with ConstantFP::get
On Sep 5, 2007, at 2:21 PM, Chuck Rose III wrote:
> Hola LLVMers,
>
>
>
> I’m getting a crash when using ConstantFP::get.
>
>
>
> I can repro it by adding one line to the Fibonacci example program:
>
>
>
> int main(int argc, char **argv) {
>
> int n = argc > 1 ? atol(argv[1]) : 24;
>
>
>
> // Create some module to put our function
2007 Sep 05
2
[LLVMdev] Seeing a crash with ConstantFP::get
It's in debug. I'm having a look at the assembler it's producing right
now and it's definitely a little odd for what should be a simple
assignment in zeroSignificand.
________________________________
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
On Behalf Of Dale Johannesen
Sent: Wednesday, September 05, 2007 2:39 PM
To: LLVM Developers Mailing
2004 Nov 05
0
[LLVMdev] Re: LLVM Visual Studio Project files
Solved it. Looking at the source of bison, I found an undocumented
environment variable M4 that points to the m4 binary. Setting it to the
absolute path did the job. When not present, it ought to find it in the
path as it uses execvp. At least on Unix. I have no idea what it does
on Windows as I could not get the source used to build the Windows
version (the installer claimed it installed the
2004 Aug 13
3
[LLVMdev] is this code really JITed and/or optimized ? ..
Hi all,
(thanks to Reid, who gave nice advice) the fibonacci function code
works now. Please find attached file.
but... the performance is adequate, say, for byte-code
interpretation mode and not for optimized JITing.
fibonacci function of 35 from attached file is more
then 100 times slower then the following code compiled
with "gcc -O2" :
-----------
#include <iostream>
int
2004 Jan 08
1
[LLVMdev] Re: idea 10
Hi Valery,
Valery A.Khamenya wrote:
>>To me this appears more as an algorithmic design issue, this function
>>could be rewritten in "continuation passing style", and each
>>continuation could be distributed by a load-balancing strategy to the
>>computers sharing CPU resources. Using mechanisms such as "futures" (as
>>in Mozart) allows to do
2007 Sep 06
0
[LLVMdev] Seeing a crash with ConstantFP::get
Hola Dale,
I spent some time walking through what's going on with a friend of mine
from VStudio. Category is given 2 bits in the APFloat class definition.
It's sign extending the enum value for the comparisons when it loads it
out of the class, so the 2 becomes a -2 and the comparison fails. He
sent me a piece of code which I might be able to use to force the issue.
I'll update
2007 May 16
2
[LLVMdev] generating ELF shared object, C code, from a module like Fibionnaci
Hello
Apparently the file llvm/examples/Fibonacci/fibonacci.cpp generate JIT code
without explicitly doing any pass (but I suppose that internally, compiler
passes are running!) - is there a dissymetry between JIT machine code
generation in memory, and C or ELF shared object generation in files? I
thought that all these shared a lot of LLVM infrastructure and happen
similarily!
Also, the
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery,
That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
repository? I'd be happy to put it in.
Reid.
Valery A.Khamenya wrote:
> Hi LLVMers,
>
> the example attached I have used to prove that JIT and some visible
> optimizations are really invoked.
>
> Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
>
2004 Aug 13
0
[LLVMdev] is this code really JITed and/or optimized ? ..
On Sat, 14 Aug 2004, Valery A.Khamenya wrote:
> (thanks to Reid, who gave nice advice) the fibonacci function code
> works now. Please find attached file.
>
> but... the performance is adequate, say, for byte-code
> interpretation mode and not for optimized JITing.
> fibonacci function of 35 from attached file is more
> then 100 times slower then the following code compiled
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
> repository? I'd be happy to put it in.
Here's an idea: how about we take the ModuleMaker, Valery's previous
example, and this one and put them all in one "small examples" project?
-Chris
> Valery A.Khamenya wrote:
>
>
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can
only build one program per directory. Were you suggesting that you wanted me to
move the entire directories under a "small examples" directory?
Reid.
Chris Lattner wrote:
> On Tue, 17 Aug 2004, Reid Spencer wrote:
>
>
>>That's pretty cute actually. Do you want this
2004 Jan 08
1
[LLVMdev] Re: idea 10
Hello Valery,
I have some comments regarding your thoughts on LLVM support for
distributed computing.
Valery A.Khamenya wrote:
>There should be an engine and layer for making dispatching optimizations in run-time. If one CPU is loaded and code is
>"parallelizable" why then not to send some part of
>calculation to other CPU? This kind of on-fly decision will
>be one day
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> On second thought, the makefiles don't (easily) allow this do they? You can
> only build one program per directory. Were you suggesting that you wanted me to
> move the entire directories under a "small examples" directory?
You're right. The simples way to do this would be to have:
projects/
SmallExamples/
2011 Oct 04
2
[LLVMdev] inlining of recursive functions
Hello,
In lib/Analysis/InlineCost.cpp, inlining of recursive functions is
disabled because it is
like loop unrolling. But
- I could not find a way to have loop unrolling do the job
- In the context of functionnal languages (I am implementing one), inlining
small recursive functions is often a great gain
My question is what is the cleanest and simplest way to inline small
recursive functions ?
2010 Sep 03
6
[LLVMdev] Why clang inlines with -O3 flag and opt doesn't?
When I compile my C fibonacci example fib.c with 'clang -O3 -c -emit-llvm -o fib-clang.bc fib.c&& llvm-dis fib-clang.bc' I get fib-clang.ll that has some degree of inlining in it.
But when I get an equivalent to fib.c file fib.ll and run it through opt with the command 'llvm-as fib.ll&& opt -O3 fib.bc -o fib-opt.bc&& llvm-dis fib-opt.bc' resulting
2010 Mar 03
1
[LLVMdev] llvm hangs: fibonacci numbers, recursive
Having tried out llvm I had to notice that the fibonacci example
program hangs after short:
> ./run fib
1
1
2
3
5
8
^C
For the next number it would be supposed to last twice as long as for 8.
However it hangs forever instead.
using llvm-2.5-0.pm.1.1.x86_64
Does not matter whether I compile it with gcc or interprete it with lli.
2004 Aug 17
4
[LLVMdev] JIT API example (fibonacci)
Hi LLVMers,
the example attached I have used to prove that JIT and some visible
optimizations are really invoked.
Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
on my Athlon XP 1500.
Nice.
P.S. guys, no fears, I don't plan to flood the cvs repository
with my "brilliant" examples ;)
---
Valery A.Khamenya
-------------- next part --------------
An