similar to: Inline constant std::function parameter

Displaying 20 results from an estimated 4000 matches similar to: "Inline constant std::function parameter"

2018 May 29
0
Inline constant std::function parameter
On 5/29/2018 10:52 AM, Eleftherios Ioannidis via llvm-dev wrote: > However that doesn't seem to be the case, does the inliner not get triggered if the functions are passed as objects (std::function) or am I using the wrong `opt` invokation? In general, the inliner can only inline direct function calls (not virtual calls, or calls through a function pointer or std::function); otherwise,
2018 May 29
1
Inline constant std::function parameter
I was afraid that was the case, since std::function is not a first-class object of LLVM. Every implementation that I can think of that inlines std::function intrinsically seems a bit awkward, in the way that it will be along the lines: “Treat this class (std::function) in a special way” A better way would be to generalize for all callables, and say something along the lines of “If a class has
2007 May 31
1
Problems when linking to R shared library
Folks, I'm fairly sure that I'm doing something stupid, but I'm getting a few really strange results from *some* of the distributions, but by no means all, when I link directly to the R shared library. I've tried this on both Windows with the precompiled Mingw binary of R-2.5.0 (compiling my code with MinGW-3.4.2), and by building R-2.5.0 on Mandriva Linux with gcc-3.4.4 and
2014 Apr 13
2
Adding an external library to Xapian
We are using the --enable-maintainer-mode and will move to git soon. The diff file is attached. *Siddhant Mutha* Undergraduate Student Department of Computer Science and Engineering IIT Madras Chennai http://www.siddhantmutha.com/ <http:/www.siddhantmutha.com/> On Sun, Apr 13, 2014 at 8:26 PM, James Aylett <james-xapian at tartarus.org>wrote: > On 13 Apr 2014, at 15:48, Pallavi
2006 Aug 25
0
Session request packet
hello list: i am learing smb protocol. i lookup NBT SESSION REQUEST PACKET from rfc 1002. SESSION REQUEST PACKET 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | FLAGS | LENGTH |
2007 Sep 28
2
[LLVMdev] Lowering operations to 8-bit!
Attached please find the gdb backtrace dump and the postscript file of the DAG right before assertion. The red Node is the current Node in LegalizeOp() The only thing that I am customizing before we get here is the FORMAL_ARGUMENTS. At this time I don't really care about the arguments, just want to get some global values working. When I trace the program, it is well passed the legalizing of
2018 Dec 09
2
Parse LLVM IR
Hello, I am a newbie to LLVM and right now I am on the hook to parse some IR code and do some instrumentations. However, my problem is that no matter how I tweak my parsing code, it simply cannot print out anything. So here is my C code: int your_fun(int arg2) { int x = arg2; return x+2; } And here is my parsing code: #include <llvm/IR/Module.h> #include
2018 Nov 30
1
Xapian Benchmark results
Hi, I am currently trying to benchmark a multithreaded xapian implementation on a chameleon baremetal instance written in C++. My workload is a 3 Gig wikipedia xml dump consisting of ~286 file of different sizes. My results are showing me that indexing on xapian is an order of magnitude faster than my lucene and lucene plusplus implementations. This is a result that I did not expect. Just want to
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors... Each of these commands correctly prints "hello": echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit echo -e '#include <iostream>\nint main(){ std::cout <<
2008 Feb 09
2
[LLVMdev] exception handling broken on x86-64?
Hi, when building the second release candidate of llvm 2.2 I noticed that exception handling seems to be broken on Linux x86-64. The exception is thrown but never caught. This can be seen by this trivial example: #include <iostream> using namespace std; class A { }; int main() { cout << "A" << endl; try { cout << "B" << endl;
2012 Sep 03
1
[LLVMdev] Selection DAG output as bare DAG, code review
Hello all, I recently foudn myself wanting to view the basic blocks in the selection DAG as pure DAGs - so just as a list of edges, with no other information. I added the below code to the start of the " void SelectionDAGISel::CodeGenAndEmitDAG()" function. It creates a separate txt file for each basic block and gives a list of edges between nodes. The segment of code is below -
2007 Apr 05
1
sizeof(std::string)
Currently we carefully try to pass std::string by const reference everywhere, which is a good idea if one assumes it's an object of non-trivial size. Bjarne Stroustrup's guideline is "more than a couple of words): http://www.research.att.com/~bs/bs_faq2.html#call-by-reference I've noticed that under GCC at least (I tried 2.95, 3.3, and 4.1) std::string just holds a pointer to
2009 Mar 17
1
question on "row.names" attribute of dataframe when called from a compiled package
Why does the following show a class attribute of "character" when using the interpreter: x <- data.frame(hat=1:10) class(rownames(x)) ## returns [1] "character" but when called from c/cpp, the rownames attribute has no class attribute, and is in fact a vector of INTSXP? > .Call("print_class_of_rownames", x, package = "test") length(x): 10
2008 Mar 17
1
how to get access to C++ Objects
In the "Writing R Extensions" manual appears this example, to get access to C++ function using the R commands: R> dyn.load(paste("X", .Platform$dynlib.ext, sep = "")) constructor Y R> .C("X_main") constructor X destructor X list() That gives me access to the function "X_main", but how to get access to methods and properties
2008 Feb 09
0
[LLVMdev] exception handling broken on x86-64?
On Feb 9, 2008, at 6:53 AM, Thomas Neumann wrote: > Hi, > > when building the second release candidate of llvm 2.2 I noticed that > exception handling seems to be broken on Linux x86-64. The exception > is > thrown but never caught. > This can be seen by this trivial example: > > #include <iostream> > using namespace std; > class A { }; > int main()
2004 Jun 09
1
About dll from c++ routine
Hi folks, My system is Windows98 + R1.9.0. The path for my system is c:\perl\bin; c:\mingw\bin; c:\rtools; c:\windows; c:\windows\command; c:\rw1090\bin. I created three files followed the examples in “Writing R extensions” in the directory c:\temp: // X.hh class X { public: X (); ~X (); }; class Y { public: Y (); ~Y (); }; // X.cc #include <iostream> #include "X.hh" static
2018 Jun 08
2
XRay FDR mode doesn’t log main thread calls
Hello, I am initializing FDR mode and finalizing/flushing the buffers manually. XRay does not log calls from the main thread unless there is a function call after __xray_log_finalize(). This behavior is abnormal since one would expect the trace file to contain all function calls made up to the point when __xray_log_finalize() is called. To demonstrate this behavior, I have taken the test case
2013 Mar 11
0
[LLVMdev] YAML IO problems
I'm trying to parse a simple JSON file, and am having problems with using YAMLIO. FWIW, I see the unit test YAMLIOTest.cpp is disabled with a #if 0. Anyway, the JSON file yaml.json contains: { "bool_test": true, "directory": ".", "suffix": "_test", "int_test": 4 } The test program when run shows: YAML:5:15: error: invalid
2006 Mar 13
1
Help on interfacing C++ with R
Hi, I am trying to set up a C++ library for my R code. I followed the R-extension manual but found out that the example of "X.cpp, X_main.cpp" is somewhat too simple. Here is my code: //lib4R.h testing for interfacing C++ with R -- using C++ library in R #include <iostream> using namespace std; class lib4R { public: lib4R(); ~lib4R(); int
2013 Aug 30
1
[LLVMdev] Are instr_iterators invalidated when function inlining is performed?
Hi, I'm trying to write a small piece of code that inlines all calls to a particular function. The codes is as follows Function* klee_check_divF = module->getFunction("klee_div_zero_check"); assert(klee_check_divF != 0 && "Failed to find klee_div_zero_check function"); // Hack inline checks for (Module::iterator f = module->begin(), fe =