Displaying 10 results from an estimated 10 matches for "testfn".
Did you mean:
testfun
2005 Jan 24
4
converting R objects to C types in .Call
...trying to write an R wrapper for a C++ library, using .Call. I've
never used .Call before. I'm currently having some difficulties converting
a R character string to a C one.
Here is a little test program.
#include <R.h>
#include <Rinternals.h>
#include <stdio.h>
SEXP testfn(SEXP chstr)
{
char * charptr = CHAR(chstr);
printf("%s", charptr);
}
This compiles without problems, but when I try to run this as
> .Call("testfn", "foo")
I get a segmentation fault.
I am sure I am making an obvious mistake, but can someone help me to sor...
2003 Dec 15
1
[LLVMdev] Assertion failed in Pass.cpp
...s
-Anshu
--- Begin pass code ---
#include <iostream>
#include "llvm/Pass.h"
#include "llvm/Function.h"
#include "llvm/PassSupport.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/Passes.h"
namespace llvm {
class testfn : public MachineFunctionPass {
public:
virtual bool runOnMachineFunction(MachineFunction &F) {
std::cout << "Reached a function" << std::endl;
return false;
}
};
RegisterLLC<testfn> X("testfn", "testfn");...
2020 Jun 13
2
target-features attribute prevents inlining?
...39;, extracts the IR of '_Z2fnP10TestStructi' and
generates a data header file (a.h), containing the raw bitcode of that
function.
(3) The data header is then built with the main program, so the main
program has access to the raw bitcode data.
(4) At runtime, the main program generates 'testfn' using llvm::IRBuilder
(something similar to Kaleidoscope tutorial does). The 'testfn' does not
have any of those attributes or MetadataNodes of course.
(5) The raw bitcode data and the 'testfn' are combined into a single module
using LLVM's LinkinModule API, then fed into o...
2020 Jun 13
2
target-features attribute prevents inlining?
...and I recently hit a weird problem about inlining behavior.
I managed to get a minimal repro and the symptom of the issue, but I
couldn't understand the root cause or how I should properly handle this
issue.
Below is an IR code consisting of two functions '_Z2fnP10TestStructi' and
'testfn', with the latter calling the former. One would expect the
optimizer inlining the call to the '_Z2fnP10TestStructi', but it doesn't.
(The command line I used is 'opt -O3 test.ll -o test2.bc')
source_filename = "a.cpp"
> target datalayout =
> "e-m:e-p270...
2020 Jun 13
2
target-features attribute prevents inlining?
...10TestStructi' and
> generates a data header file (a.h), containing the raw bitcode of that
> function.
> > (3) The data header is then built with the main program, so the main
> program has access to the raw bitcode data.
> > (4) At runtime, the main program generates 'testfn' using
> llvm::IRBuilder (something similar to Kaleidoscope tutorial does). The
> 'testfn' does not have any of those attributes or MetadataNodes of course.
> > (5) The raw bitcode data and the 'testfn' are combined into a single
> module using LLVM's LinkinMo...
2008 Dec 03
1
Function output difficulties
is there anyway for some parts of the function output to not be returned,
even if the output has been used to calculate a further part of the
function? i have tried invisible() to no avail.
Thanks Emma
--
View this message in context: http://www.nabble.com/Function-output-difficulties-tp20813117p20813117.html
Sent from the R help mailing list archive at Nabble.com.
2004 Aug 24
0
additional examples for R-intro.texi (PR#7195)
...ons
--- R-intro.texi~ Tue Aug 24 11:21:39 2004
+++ R-intro.texi Tue Aug 24 11:21:39 2004
@@ -3848,6 +3848,17 @@
fun1(f, a, b, fa, fb, a0, eps, lim, fun1)
@}
@end example
+@noindent
+The following test cases demonstrate the use of this function:
+
+@example
+> area(sqrt,0,1)
+0.6666557
+> testfn <- function(x) 1/(1+x^2)
+> area(testfn, 0, 100)
+1.560808
+@end example
+
@menu
* Scope::
2009 Apr 13
2
I want to use Sweave, but only sometimes
...he future, so I don't want to just convert the
document to pure LaTeX format.
Here's why I think this must be possible. In this list, I saw one of
you explain this approach to working with figures in Sweave docs:
Instead of using the automatic figure inclusion approach like this:
<<testfn2, fig=true>>=
curve(sin, from = 1, to = 55)
@
Do this instead:
\SweaveOpts{prefix.string=foo/bar}
<<testfn2, fig=true, include=false>>=
curve(sin, from = 1, to = 55)
@
\begin{figure}
\caption{My Figure}
\includegraphics{foo/bar-testfn}
\end{figure}
As long as the figures a...
2020 Jan 23
2
Longstanding failing tests - clang-tidy, MachO, Polly
So, for this test case:
extern "C" void shouldBeUnconditional();
extern "C" void shouldBeConditional();
extern "C" void otherCall();
void testFn(bool Bool1, bool Bool2) {
Bool1 |= Bool2;
shouldBeUnconditional();
if (Bool1)
shouldBeConditional();
if (Bool2) {
otherCall();
if (Bool1)
otherCall();
}
}
MSVC generates this buggy asm:
$ cl -c -Fat.asm msvc-bool-bug.cpp -O2
Microsoft (R) C/C++ Optimizing Compiler Vers...
2020 Jan 22
4
Longstanding failing tests - clang-tidy, MachO, Polly
Hi,
A few tests seem broken for a long time, some for more than a month. Would it possible for respective owners to take a look please?
I'm at checkout 133a7e631cee97965e310f0d110739217427fd3d, compiling on Windows 10.
These tests fail with Visual Studio 2019:
Failing Tests (7):
Clang Tools :: clang-tidy/checkers/cert-mem57-cpp-cpp17.cpp
Clang Tools ::