similar to: Creating a list of functions

Displaying 20 results from an estimated 80000 matches similar to: "Creating a list of functions"

2009 Jul 28
4
check for new files in a given directory
I am trying to continuously evaluate online created data files using R-algorithms. Is there any simple way to let R iteratively check for new files in a given directory, load them and process them? Any help would be highly appreciated. Best, A. [[alternative HTML version deleted]]
2004 Jun 25
2
Sweave: R code in self defined TeX-commands
Hi, I need to produce a standard report for several variables in Sweave and thus would need the possibility to define a TeX-command which includes R-code like \newcommand{\meansd}[1]{The mean is \Sexpr{mean(#1)} and the standard deviation is \Sexpr{sd(#1)} . } and then just write \meansd{age} in the latex code to get the whole sentence. The above does not work, since
2009 Jul 27
1
read binary file seek()
I want to read in a binary file using the readBin() function. In order to skip uninformative parts of the file I use the seek() function, I need to specify the number of bits to skip rather than the number of bytes to skip. E.g. seek(to.read,origin="current",blockSize) with blockSize giving the number of bits Does anybody know if this works? Any help would be highly
2017 Oct 11
2
How to create an alloca variable of type i64 in LLVM IR?
To create a stack based (local) 64 bit integer in LLVM IR, I used: Value *var = builder.CreateAlloca(Type::getInt64Ty(Ctx)); I wish to pass this variable to a function "void foo(unsigned long)". I created the signature of function foo() as follows: Constant *func = M->getOrInsertFunction("foo", Type::getVoidTy(Ctx),Type::getInt64Ty(Ctx), NULL); To pass the newly created
2012 Feb 01
1
[LLVMdev] Function Insertion Error
Hi, I am trying to insert a function into the LLVM IR. But i get a stack dump exception. My code is as follows.   #include "llvm/Pass.h" #include "llvm/Function.h" #include "llvm/Module.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/IRBuilder.h" using namespace llvm;   namespace {
2012 Apr 25
2
[LLVMdev] Crash in JIT
Hello, [Using LLVM r155315, according to `svn log | head`] I am experimenting with programatically building and jitting functions in a module, and I seem to be coming across a crash in some generated code. Using the llvm-c interface I build up the module which dumps like this: ; ModuleID = 'MyModule' target datalayout = "i686-apple-darwin11" target triple =
2017 Apr 28
2
How to get the address of a global variable in LLVM?
Let `x` be the address of a global variable `g` in a program at run-time. LLVM IR produces a store instruction as shown below: store i32 30, i32* @g, align 4 I am writing an LLVM pass which will instrument the program such that `x` is passed to an instrumentation function `func(int addr)` at run-time. I can insert a call to `func` using `IRBuilder` successfully. What I am not being able to
2012 Apr 25
0
[LLVMdev] Crash in JIT
Hi David, I'm not certain, but to me the "LLVMSetTarget(module, "i686-apple-darwin11");" line looks suspicious. I'm not familiar with all the ins and outs of how target triples get handled, but it looks to me like that's requesting 32-bit code. I think that if you omit that line completely then the target will be inferred from the execution environment. My best
2010 Apr 18
2
[LLVMdev] Creating a Return Instruction.
Hi all, I have to create a return instruction in a function. The function is of type -- void * func (void *) . So i have to create a return instruction for the function that should return a void pointer. But actually the function will not return anything useful . it will be something like -- return void * null. The problem i am facing is to create a return instruction the Create function
2012 Jul 02
1
[LLVMdev] Intrinsic::getDeclaration causing dump() segfault
In the following scrap of code (pared down from actually useful code), the func->dump() command segfaults iff the commented-out line is uncommented. This is with llvm 3.0. I'm only dipping my toes into the waters of llvm for the first time, and have no idea what I am doing incorrectly. In actual code, I would be wanting to call the memcpy intrinsic eventually, of course. int main(void)
2005 May 17
1
install.packages Bug? (PR#7876)
Full_Name: Martin Posch Version: 2.1.0 and 2.1.0 patched OS: Windows XP SP2 Submission from: (NULL) (131.130.1.135) When installing the Hmisc package using the install option in the RGUI I get the error message under both R 2.1.0 and R 2.1.0 patched (see the outputs below). I tried the install after a fresh reboot (to minimize the possibility of locked up files). The same problem arises with
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 12:05, Tim Northover <t.p.northover at gmail.com> wrote: > On 11 June 2017 at 11:56, Dipanjan Das via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > I can't pass var_value to a function accepting uint64_t. LLVM complains > > about broken function call. > > Well, yes. var_value has type "ConstantInt *", not uint64_t. Assuming
2017 Jun 12
2
Force casting a Value*
On 11 June 2017 at 14:04, don hinton <hintonda at gmail.com> wrote: > Assuming you know it's a 64 bit value, and the function you are calling > takes a uint64_t, try this: > The values from the test program are of type: i32/i32*/i32**. Can't I interpret these as uint64_t some way? > > Value* args[] = {store_inst->getOperand(0)}; > > > On Sun, Jun 11,
2015 May 19
2
[LLVMdev] Module crash when adding CallInst
Hi, I am learning to write LLVM modules. I am using IRBuilder to insert calls to an existing function. The call is to be inserted at a random location in every function in the code. The call does get inserted, however, the module crashes later (after doFinalization()). The crash happens only sometimes, not always. These are the kind of instructions that I see in the generated code. %callins =
2011 May 12
0
[LLVMdev] Extract operations as function
Hi Manish, > Great!! Thanks Duncan. > By step 1 that you mentioned it seems I can write my function func(x,y,op) in > mypass.cpp itself. Please elaborate how can add it to the module? the minimum is to add a prototype for "func" to the module. For that you can use getOrInsertFunction. If you want to insert the code defining "func" too, then insert the prototype,
2009 Sep 30
5
Cant create new VM: Error -> ERROR (XendDomainInfo:445) VM start failed
Hi everyone, i have a problem on a running xen installation. The server on which the following problem occurs manages 7 VMs at the moment. Now I wanted to create a new one. After sending the xm create command I get the following error: Using config file "/etc/xen/de-smartnet-asterisk". Error: Creating domain failed: name=de-smartnet-asterisk In my xend.log I can find the following
2012 Nov 02
4
[LLVMdev] Instruction does not dominate all uses! <badref> ??
I'm having trouble figuring out what the error "Instruction does not dominate all uses!" means. I'm trying to construct a call to a function with two parameters. The printed IR, with error, looks like this: define i32 @add(i32, i32) { EntryBlock: %2 = add i32 %0, %1 ret i32 %2 } define i32 @eval_expr() { EntryBlock: ret i32 <badref> } Instruction does not dominate
2010 Oct 05
2
How to convert a list to a ... argument for a function
Hi, I have a function f <- function(..., func){ something }, where func is a function of the form function(...). ?I would like to pass func all the arguments passed to f except the last. ?I know that I can manipulate the variable number of arguments passed to f by converting ... to a list, i.e., arglist <- list(...). ?But how do I pass func the first n-1 list items of arglist (n <-
2011 May 12
2
[LLVMdev] Extract operations as function
Great!! Thanks Duncan. By step 1 that you mentioned it seems I can write my function func(x,y,op) in mypass.cpp itself. Please elaborate how can add it to the module? On Thu, May 12, 2011 at 1:22 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Manish, > > > I am planning to extract every operation as function. > > > > eg. z=x+y; ==> z=func(x,y,op); > >
2014 Oct 28
2
[LLVMdev] Storing values in global variables
Hello, I have written a pass that works nicely if I use it with the opt tool, as proposed by the "Writing an LLVM Pass" tutorial. Now I want to execute this pass directly when clang is executed. I use the technique described here: http://homes.cs.washington.edu/~asampson/blog/clangpass.html. The pass is loaded and executed, when I run clang with the right command line. But clang