search for: thefunct

Displaying 20 results from an estimated 20 matches for "thefunct".

Did you mean: thefunc
2011 May 26
3
change function scope?
I'm still getting used to R's scoping. I've run into the following situation value=0 thefunction <- function() print( value ) somefunction <- function() { value=99; thefunction() } somefunction() now, I understand that somefunction() returns 0 because thefunction() was defined with value=0 in its parent envrionment, it dosent look at all in the environment of somefunction. My questio...
2000 Jul 25
2
number of parameters of a function.
Is there a way to programmatically determine how many arguments a function accepts? In S, one can compute this as length(theFunction) - 1 and determine the parameter names as names(theFunction) due to the representation of functions. (Just in case anyone is thinking of nargs(), that is just for particular calls and does not concern itself with the function definition.) Thanks, Duncan -- ____________________...
2008 Apr 10
0
[LLVMdev] LLVMBuilder vs LLVMFoldingBuilder
Dominic Hamon wrote: > Duncan Sands wrote: >>> Another option that was discussed in #llvm is to nuke LLVMBuilder >>> and rename LLVMFoldingBuilder to LLVMBuilder. If this was the case, >>> I'd argue for a flag in the Builder that could retain the old >>> non-folding functionality for debugging purposes. >>> >> >> this plan
2008 Apr 11
4
[LLVMdev] LLVMBuilder vs LLVMFoldingBuilder
...ese line up again. -<p>Well, that was easy :). In practice, we recommend always using ... +<p>Well, that iss easy :). In practice, we recommend always using you changed was to iss, I guess you meant "is", though I would prefer "was". - LLVMBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(), + IRBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(), TheFunction-&gt;getEntryBlock().begin()); Here the arguments no longer line up properly. - LLVMBuilder TmpB(&amp;TheFunction-&gt;getEntryBlock(), + IRBuilder TmpB(&amp...
2008 Apr 10
3
[LLVMdev] LLVMBuilder vs LLVMFoldingBuilder
Duncan Sands wrote: >> Another option that was discussed in #llvm is to nuke LLVMBuilder and >> rename LLVMFoldingBuilder to LLVMBuilder. If this was the case, I'd >> argue for a flag in the Builder that could retain the old non-folding >> functionality for debugging purposes. >> > > this plan sounds good to me. However it's not clear to me how
2010 Feb 17
2
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size(); ++AI, ++Idx) { AI->setName(Args[Idx]); // Add arguments to variable symbol table. NamedValues[Args[Idx]] = AI; } return F; } Function *FunctionAST::Codegen() { NamedValues.clear(); Function *TheFunction = Proto->Codegen(); if (TheFunction == 0) return 0; // Create a new basic block to start insertion into. BasicBlock *BB = BasicBlock::Create(getGlobalContext(), "entry", TheFunction); Builder.SetInsertPoint(BB); if (Value *RetVal = Body->Codegen()) { // Finish...
2011 Mar 11
2
How to get all combinations between two character vectors?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I know there is a function - I have used it before - but I always forget what it is called... I need the combination of two character vectors, i.e: x <- c("a", "b") y <- c("x", "y") z <- THEFUNCTION(x, y) z == c("ax", "ay", "bx", "by") I promise I will write the name of the function on my desk! Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Inv...
2010 Feb 17
0
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...!= Args.size(); > ++AI, ++Idx) { > AI->setName(Args[Idx]); > > // Add arguments to variable symbol table. > NamedValues[Args[Idx]] = AI; > } > > return F; > } > > Function *FunctionAST::Codegen() { > NamedValues.clear(); > > Function *TheFunction = Proto->Codegen(); > if (TheFunction == 0) > return 0; > > // Create a new basic block to start insertion into. > BasicBlock *BB = BasicBlock::Create(getGlobalContext(), "entry", > TheFunction); > Builder.SetInsertPoint(BB); > > if (Value *RetVal...
2005 Apr 20
5
Overloading methods in R
...(1) is TRUE and (2) is FALSE, can anyone provide some advice on developing some function that understand what the arguments are and then calls the right overloaded function? It would be something like this: overloadedFunction1 <- function(x) {}; overloadedFunction2 <- function(x, y) {}; theFunction <- function(...) { # How to identify ... and call the right overloaded function? }
2010 Feb 17
1
[LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
...   AI->setName(Args[Idx]); >> >>    // Add arguments to variable symbol table. >>    NamedValues[Args[Idx]] = AI; >>  } >> >>  return F; >> } >> >> Function *FunctionAST::Codegen() { >>  NamedValues.clear(); >> >>  Function *TheFunction = Proto->Codegen(); >>  if (TheFunction == 0) >>    return 0; >> >>  // Create a new basic block to start insertion into. >>  BasicBlock *BB = BasicBlock::Create(getGlobalContext(), "entry", >> TheFunction); >>  Builder.SetInsertPoint(BB); &...
2018 Jul 20
2
LLVM FunctionType cannot be returned as VectorType?
...////////////////////////////////////////// // Define the input/output data type in LLVM function typedef std::vector<int64_t> VecInt; auto function = reinterpret_cast<VecInt (*)(VecInt , VecInt, VecInt, VecInt, VecInt, VecInt, VecInt, VecInt)>(TheExecutionEngine->getFunctionAddress(TheFunction->getName().str())); VecInt result = function(functionCallArgs[0],functionCallArgs[1],functionCallArgs[2],functionCallArgs[3], functionCallArgs[4],functionCallArgs[5],functionCallArgs[6],functionCallArgs[7]); std::cout<<"result size "<< result.size()<<"\n&quo...
2018 Jul 23
2
LLVM FunctionType cannot be returned as VectorType?
..., VecInt , VecInt , VecInt , VecInt , VecInt , VecInt , VecInt ))(TheExecutionEngine->getFunctionAddress(TheFunction->getName().str())); VecInt argsX = {0,0,0,0}; int64_t* result = function(argsX,argsX,argsX,argsX,argsX,argsX,argsX,argsX); //////////////////////////////////////////////////////////// /////////////////////////////// My output result: 422162285262848 562251371602737 843692813695832 42216228...
2020 Oct 04
1
Help in R code
Hello , i am working in the functional time series using themultivariate time series data(hourly time series data). Sir? i am usingFAR model more than one order for which no statistical package is available inR, so for this i convert my data into functional form and obtained thefunctional principle component and from those FPCA i extract theircorresponding? FPCscores. Know i use the VAR model on those FPCscores forthe forecasting of each 24 hours through the VAR model, but the VAR give me theforecasted value for all 23hours? when i put phat=23, but whenever i putphat=24 i.e wan...
2018 Jul 23
2
LLVM FunctionType cannot be returned as VectorType?
...cInt > > , VecInt > > , VecInt > > , VecInt > > , VecInt > > , VecInt > > > ))(TheExecutionEngine->getFunctionAddress(TheFunction->getName().str())); > > > > VecInt argsX = {0,0,0,0}; > > int64_t* result = > function(argsX,argsX,argsX,argsX,argsX,argsX,argsX,argsX); > > > > > > > /////////////////////////////////////////////////////////////////////////////////////////// > My...
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
...;TheContext" - Chapter 3: 5 times - Chapter 4: 1 time - Chapter 5: 4 times - Chapter 6: 2 times - Chapter 7: 2 times 3.4. Function Code Generation - Wouldn't it make sense to have a "Type *DoubleTy = Type::getDoubleTy(TheContext);"? - "Function *TheFunction = TheModule->getFunction(Proto->getName());" The new getName method is unexpected, the tutorial user has to lookup and copy the definition from the full listing. 3.5. Driver Changes and Closing Thoughts - "When you quit the current demo" -> "When you...
2013 Mar 26
0
[LLVMdev] Fwd: Extending Kaleidoscope to support Strings
...obalContext(), r); } For a test string of "Hello World!", I am trying to create an Alloca * and store the InitVal, which I get from codegen of StringExprAST. uint64_t v(13); APInt d(8, v); Value * ArraySize = ConstantInt::get(getGlobalContext(), d); Alloca = CreateEntryBlockAllocaString(TheFunction, VarName, ArraySize); Builder.CreateStore(InitVal, Alloca); I get the following error: tok_string: "Hello World!" Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val t...
2013 Feb 01
0
R code parallelized using plyr and doMC: error message: Error in do.ply(i) : task 1 failed - “could not find function ”getClass“”
...y at the supercomputer is in the process of getting Rmpi running. For now, 32 cores should be (more than) adequate for me. My script is of the sort: |define a bunch of functions load the data call libraries require(doMC) require(plyr) registerDoMC(32) main.function <- function(data){ *thefunction* } results= llply(1:500, function(idx){out<-main.function(data)},.parallel=TRUE) save(results,file="trestles_results")| This runs fine on my own machine (setting it to run only a few times and registering only a couple of cores). But when I run it on the cluster, the out...
2011 Mar 11
0
Fwd: How to get all combinations between two character vectors?
...c('x', 'y'), sep='')) Dave >Hi I know there is a function - I have used it before - but I always forget what it is called... I need the combination of two character vectors, i.e: x <- c("a", "b") y <- c("x", "y") z <- THEFUNCTION(x, y) z == c("ax", "ay", "bx", "by") I promise I will write the name of the function on my desk! Thanks, Rainer [[alternative HTML version deleted]] ______________________________________________ -help@r-project.org mailing list ttps://stat.ethz.ch...
2017 Feb 14
2
RFC: Representing unions in TBAA
On Tue, Feb 14, 2017 at 5:51 AM, Hubert Tong < hubert.reinterpretcast at gmail.com> wrote: > On Mon, Feb 13, 2017 at 10:39 PM, Daniel Berlin <dberlin at dberlin.org> > wrote: > >> >> >> On Mon, Feb 13, 2017 at 10:07 AM, Hubert Tong < >> hubert.reinterpretcast at gmail.com> wrote: >> >>> On Mon, Feb 13, 2017 at 2:23 AM, Daniel
2005 Aug 18
8
Extending a js class
It''s been a few days since I posted my last two emails (of which, no one replied to) so I''ve gone ahead and coded a working slider class as well as a ''resizeable'' class that allows a user to drag and resize the element. I also linked these two together as I want to have slider behavior that can resize the resizeable element. The end result is both the