Displaying 20 results from an estimated 10000 matches similar to: "How do you construct a function from a list? (PR#743)"
2000 Nov 21
1
How do you construct a function from a list?
I'm trying to get a data.restore function to work on functions. One
thing I can't figure out: how do you construct a function from it's
component parts?
For example, I can construct a for loop as
forloop <-
as.call(list(as.name('for'),as.name('i'),1,as.call(list(as.name('junk')))))
which results in
for (i in 1) junk()
But how do I put that in a
2009 Oct 06
2
[LLVMdev] What opt pass attempts implements this optimization?
I have a very simple kernel that is generating very very bad code.
The basic kernel pseudo-code is as follows:
forloop(1 to n) {
forloop(0 to j) {
A
}
B
}
C
It is generating very ugly and inefficient code for a vector system
similar to the following pseudo-code:
if (n > 1) {
if (j) {
forloop(1 to n) {
forloop(0 to j) {
2009 Oct 07
0
[LLVMdev] What opt pass attempts implements this optimization?
On Oct 6, 2009, at 4:28 PM, Villmow, Micah wrote:
> I have a very simple kernel that is generating very very bad code.
>
> The basic kernel pseudo-code is as follows:
> forloop(1 to n) {
> forloop(0 to j) {
> A
> }
> B
> }
> C
>
> It is generating very ugly and inefficient code for a vector system
> similar to the following pseudo-code:
> if (n >
2006 Apr 01
0
sftp tab completion patch (First release - NOT FOR INCLUDING YET)
This applies to the OpenBSD --current tree. Don't see why it shouldn't
work under portable.
Within the patch are the updates I need to make before I'll actually
submit it for real, but I figured I'd make a public drop.
Since I'm not on this list anymore keep me in the CC: if you want me to
respond.
I'll continue to work as time permits, but it would be nice if people
2007 Dec 12
0
Revisiting sftp tab completion patch
I've finally took the time to figure the last few bugs (that I know of).
This patch will be submit to be included in a few weeks. This patch
should be generic enough for portable without too much hassle.
This patch mimics OpenBSD's ftp behavior. I'm not sure like that (e.g. it
doesn't put / at the end of directories by default), but that is more a
question for the community
2005 Jan 26
1
summarizing daily time-series date by month
Message: 63
Date: Wed, 26 Jan 2005 04:28:51 +0000 (UTC)
From: Gabor Grothendieck <ggrothendieck at myway.com>
Subject: Re: [R] chron: parsing dates into a data frame using a
forloop
To: r-help at stat.math.ethz.ch
Message-ID: <loom.20050126T052153-333 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii
Benjamin M. Osborne <Benjamin.Osborne <at> uvm.edu>
2013 Jan 08
2
[LLVMdev] ExecutionEngine always comes back NULL
Sorry I forgot to add code that I use to run code:
/* Executes the AST by running the main function */
GenericValue CodeGenContext::runCode() {
std::cout << "Running code...\n";
ExecutionEngine *ee = EngineBuilder(module).create();
vector<GenericValue> noargs;
GenericValue v = ee->runFunction(mainFunction, noargs);
std::cout << "Code was run.\n";
return v;
2017 Aug 04
2
Why is as.function() slower than eval(call("function"())?
(Apologies if this is better suited for R-help.)
On my system (macOS Sierra, late 2014 MacBook Pro; R 3.4.1, Homebrew build), I found that it is faster to construct a function using eval(call("function", ...)) than using as.function(list(...)). Example:
make_fn_1 <- function(a, b) eval(call("function", a, b), env = parent.frame())
make_fn_2 <- function(a, b)
2012 May 28
0
[LLVMdev] Help with Values sign
In my main function after generate the code and before start the execution via
JIT I do this:
ExecutionEngine *EE = EngineBuilder(M).create();
string str =
EE->getTargetData()->getStringRepresentation();
str[0] = 'e';
M->setDataLayout(str);
if (verifyModule(*M)) {
errs() << argv[0] << ": Error building the
2013 Jan 08
0
[LLVMdev] ExecutionEngine always comes back NULL
On Jan 8, 2013, at 8:09 , Manuele Conti <manuele.conti at sirius-es.it> wrote:
> Sorry I forgot to add code that I use to run code:
> /* Executes the AST by running the main function */
> GenericValue CodeGenContext::runCode() {
> std::cout << "Running code...\n";
> ExecutionEngine *ee = EngineBuilder(module).create();
> <
> div
2005 Jan 25
1
chron: parsing dates into a data frame using a forloop
I have one data frame with a column of dates and I want to fill another data
frame with one column of dates, one of years, one of months, one of a unique
combination of year and month, and one of days, but R seems to have some
problems with this. My initial data frame looks like this (ignore the NAs in
the other fields):
> mans[1:10,]
date loc snow.new prcp tmin snow.dep tmax
1
2004 Aug 13
3
[LLVMdev] is this code really JITed and/or optimized ? ..
> If it's that slow, you're probably getting the interpreter instead of the
> JIT. Try adding -print-machineinstr to the command line, or -debug, and
> see what happens. If you're not getting the JIT, try stepping through the
> LLVM program to see where it makes the execution engine and decides which
> one to use...
(thanks for quick reply)
hm, here is the part of my
2000 Nov 26
0
Bug in args with no defaults (PR#747)
This turned up in the same context as #743, i.e. writing data.restore.
Two bugs, I think:
The way arguments with no defaults are stored appears to be as a
zero-length name:
> test <- function(x) 1
> as.list(test)$x
> mode(as.list(test)$x)
[1] "name"
> as.character(as.list(test)$x)
[1] ""
However, I'm not allowed to create one of those:
>
2009 Jan 03
2
R badly lags matlab on performance?
Here's a small R program:
---------------------------------------------------------------------------
a <- rep(1,10000000)
system.time(a <- a + 1)
system.time(for (i in 1:10000000) {a[i] <- a[i] + 1})
---------------------------------------------------------------------------
and here's its matlab version:
2004 Aug 13
0
[LLVMdev] is this code really JITed and/or optimized ? ..
On Sat, 14 Aug 2004, Valery A.Khamenya wrote:
> hm, here is the part of my code starting LLVM function:
>
> ///////////////////////////
> ExistingModuleProvider* MP = new ExistingModuleProvider(M);
> ExecutionEngine* EE = ExecutionEngine::create( MP, true );
As Reid pointed out, changing true to false will get it to work.
> // Call the `foo' function with no
2012 May 28
1
[LLVMdev] Help with Values sign
Why are you changing the data layout to be little-endian?
Joey
On 28 May 2012 10:13, Santos Merino <santitox at hotmail.es> wrote:
> In my main function after generate the code and before start the execution
> via
> JIT I do this:
>
> ExecutionEngine *EE = EngineBuilder(M).create();
> string str =
> EE->getTargetData()->getStringRepresentation();
2013 Jan 09
1
[LLVMdev] ExecutionEngine always comes back NULL
Hi Rick,
you are right!
But can you call this method EngineBuilder::setErrorStr to get creation
error?
Cheers,
Manuele
Il 08/01/2013 20:27, Rick Mann ha scritto:
> On Jan 8, 2013, at 8:09 , Manuele Conti <manuele.conti at sirius-es.it> wrote:
>
>> Sorry I forgot to add code that I use to run code:
>> /* Executes the AST by running the main function */
>>
2011 Nov 25
2
[LLVMdev] LLVM 2.9 - JIT problem on Windows
> > > My bet is that your code is writing through a stray pointer. By
> > > removing the call to InitializeNativeTarget you are simply hiding
> > > your bug by running the code within a context that turns its effects
> harmless.
> > >
> > > OTOH, LLVM 2.9 may be the culprit. In any case, it is time for a
> > > assembler- level debug session
2009 Mar 22
0
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
Hi,
Was this ever resolved?
I'm curious, I'm also in a situation where there may be many (very
many) JITted functions over the history of an application (which may
be running for many days)
Thanks
On Mar 20, 2009, at 7:34 AM, George Giorgidze wrote:
> Hi,
>
> In my application I am JITing thousands of functions, though I am
> doing it sequantially and running only
2004 Aug 10
1
[LLVMdev] API on JIT, code snippets
Valery,
Your JIT sample program has been added to projects/HowToUseJIT.
I have defaulted the license to the standard UIUC license. Let me know if
that's not okay and I'll fix it.
If you continue to work on this (providing a command line option to use either
interpreter or JIT would be nice), please provide patches against these files
and I'll commit them for you.
Here's the