Displaying 20 results from an estimated 296 matches for "endl".
Did you mean:
end
2007 May 31
1
Problems when linking to R shared library
...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 --enable-R-shlib. The actual code is at the end of
the message, but the main cases are:
std::cout << pf(1.5, 2.0, 3.0, 1, 0) << std::endl;
Outputs 1, expect 0.646447
std::cout << pchisq(1.5, 2.0, 1, 0) << std::endl;
Outputs 1, expect 0.527633
std::cout << pgamma(1.5, 2.0, 3.0, 1, 0) << std::endl;
Outputs 1, expect 0.090204
std::cout << ppois(2.0, 5.0, 1, 0) << std::endl;
Outputs 0, expect 0....
2014 Apr 13
2
Adding an external library to Xapian
...tream>
+#include <fstream>
+
#include <cstdlib> // For abs().
#include <cstring>
@@ -94,6 +98,18 @@
LOGCALL_DTOR(API, "Database");
}
+// LOG Function
+void
+Database::log(const std::string &query) {
+ cout << "In Database::log" << endl;
+ // For now usind DB's UUID to record logs
+ string logname = "../logs/" + this->get_uuid();
+ cout << "Log file: " << logname << "Query " << query << endl;
+ std::ofstream logfile(logname.c_str(), ios::out | ios::app);
+ logfile...
2018 Dec 09
2
Parse LLVM IR
...lt;iostream>
#include <llvm/Support/raw_ostream.h>
using namespace llvm;
int main()
{
LLVMContext context;
SMDiagnostic error;
Module *m = parseIRFile("t.ll", error, context).get();
if(!m)
{
return 0;
}
std::cout << error.getMessage().str() << std::endl;
std::cout << sizeof(m->getFunctionList()) << std::endl;
auto iter1 = m->getFunctionList().begin();
std::cout << " Function: " << (*iter1).getName().str() << std::endl;
for (auto iter1 = m->getFunctionList().begin();
iter1 != m->ge...
2014 Apr 13
2
Adding an external library to Xapian
My code is not on Github. I am using the tarball as of now. The following
it the error that occurred:
http://pastebin.com/cVJrjUZX
On Sun, Apr 13, 2014 at 8:16 PM, James Aylett <james-xapian at tartarus.org>wrote:
> On 13 Apr 2014, at 15:37, Pallavi Gudipati <pallavigudipati at gmail.com>
> wrote:
>
> > A linker error is encountered even after following the above
2006 May 11
2
C++ Set_Metadata Problem
I refer to a problem that appeared on the flac list last August that was
either solved off-list or abandoned.
(http://lists.xiph.org/pipermail/flac/2005-August/000468.html)
The problem is with using the C++ encoder classes, particularly the
FLAC::Encoder::File:set_metadata
function. JC said that the developers version of how to add a simple
metadata block looked right, but it did not work for
2006 Aug 25
0
Session request packet
..., int socketid);
bool getnetbiosname(char* netbiosname, const char* hostname, unsigned char type);
//Main function
int main(int argc, char *argv[])
{
int socketid = 0;
if((socketid = connectHost("192.168.2.65", 139)) == -1)
cout << "Connect host error" << endl;
NBT_Request request;
request.NBTSessionHeader.type = 0x81;
request.NBTSessionHeader.flags = 0x0;
request.NBTSessionHeader.length = htons(0x40);
getnetbiosname(request.called.name, "0", 0x20);
getnetbiosname(request.calling.name, "0", 0x00);
cout <<...
2012 Sep 03
1
[LLVMdev] Selection DAG output as bare DAG, code review
...ng the same
information - or if there are any obvious omissions in the code that
might be affecting the results.
Thanking you all in advance.
Joe
CODE
void SelectionDAGISel::CodeGenAndEmitDAG() {
std::string GroupName;
std::cout<<"-Joe: we have entered a block"<<std::endl;
static int numberOfBlocks=0;
numberOfBlocks++;
std::cout<<"-We are in Block:"<<numberOfBlocks<<std::endl;
//FIRST OF ALL, LET US TRY NUMBERING THE NODES
int in=0;
for (SelectionDAG::allnodes_iterator I =
CurDAG->allnodes_begin(),E = CurDAG->...
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
...h 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 << "hello" << std::endl; }' | clang -cc1 -emit-llvm-bc -x c++ | lli
Each of these commands results in "LLVM ERROR: Could not resolve external global address: __dso_handle":
echo -e '#include <iostream>\nint main(){ std::cout << "hello" << std::endl; }' | clang -cc1 -e...
2008 Feb 09
2
[LLVMdev] exception handling broken on x86-64?
...d 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;
throw A();
cout << "C" << endl;
} catch (const A&) {
cout << "D" << endl;
}
cout << "E" << endl;
}
When compiled with llvm-g++ it aborts a...
2010 Apr 19
1
[PATCH matahari] Removes all code for the previous CPUWrapper class.
...istringstream i(str);
- targetType t;
- if (!(i >> t))
- throw invalid_argument("Conversion failure for " + str);
- return t;
-}
-
-ostream& operator<<(ostream& output, const CPUWrapper& cpu)
-{
- output << "Processor" << endl;
- output << "CPU #: " << cpu.cpunum << endl;
- output << "Core #: " << cpu.corenum << endl;
- output << "Num. Cores: " << cpu.numcores << endl;
- output << "Model: " << cpu.model &...
2011 Mar 03
3
top and allocation issues
In a context where exceptions are caught, I ran
the fragment:
cerr << "allocating" << endl;
char* arr[100];
for (int jj = 0; jj < 10; ++jj)
{
cerr << "jj = " << jj << endl;
arr[jj] = new char[2000000000];
sleep (30);
}
sleep (10);
for (int jj = 0; jj < 10; ++jj)
delete[] arr[jj];
cerr << "deleted...
2012 May 07
0
R CMD check, interfacing c++ linking errors
...s.
The relevant c++ source from conf-infomap.cpp:
#include "conf-infomap.h"
#include "R.h" // R functions
#include "Rinternals.h"
#include "Rmath.h" // R math
#include "Rdefines.h"
using namespace std;
using std::cout;
using std::cin;
using std::endl;
[...]
extern "C" {
void RosvallDynamicSkeleton(int *seed,char** file, int *attempts, int
*resamples, double *conf) {
int ret = confInfomap(seed[0],file,attempts[0],resamples[0],conf[0]);
if(ret == 0)
Rprintf("cluster map has been written to %s\n", file[0]);
R_FlushConsole(...
2012 May 08
0
R CMD check, c++ source linking errors
...s.
The relevant c++ source from conf-infomap.cpp:
#include "conf-infomap.h"
#include "R.h" // R functions
#include "Rinternals.h"
#include "Rmath.h" // R math
#include "Rdefines.h"
using namespace std;
using std::cout;
using std::cin;
using std::endl;
[...]
extern "C" {
void RosvallDynamicSkeleton(int *seed,char** file, int *attempts, int
*resamples, double *conf) {
int ret = confInfomap(seed[0],file,attempts[0],resamples[0],conf[0]);
if(ret == 0)
Rprintf("cluster map has been written to %s\n", file[0]);
R_FlushConsole(...
2009 Mar 17
1
question on "row.names" attribute of dataframe when called from a compiled package
...YPEOF(x): 13
R_ClassSymbol is null.
NULL
>
is this the intended behaviour?
-Whit
here is my test code:
SEXP print_class_of_rownames(SEXP dataframe_sexp) {
SEXP x = getAttrib(dataframe_sexp,install("row.names"));
cout << "length(x): " << length(x) << endl;
cout << "TYPEOF(x): " << TYPEOF(x) << endl;
if(getAttrib(x, R_ClassSymbol)==R_NilValue) {
cout << "R_ClassSymbol is null." << endl;
} else {
cout << "R_ClassSymbol is a good value." << endl;
}
return R_NilVal...
2007 Sep 28
0
[LLVMdev] Lowering operations to 8-bit!
On Sep 28, 2007, at 11:36 AM, <Alireza.Moshtaghi at microchip.com>
<Alireza.Moshtaghi at microchip.com> wrote:
> I moved my code to 2.1 but still the same.
> If I make ADD i16 legal, then it goes through, but it has problem
> expanding it to i8.
> Should I go ahead and customize it and do the same for all
> instructions?
> Or there is a more general thing that I
2008 Mar 17
1
how to get access to C++ Objects
...+ files:
// X.hh
class X
{
public:
int f;
X ();
~X ();
int Z(int a, int b);
};
class Y
{
public: Y ();
~Y ();
};
// X.cc
#include <iostream>
#include "X.hh"
static Y y;
X::X() { std::cout << "constructor X" << std::endl; }
X::~X() { std::cout << "destructor X" << std::endl; }
Y::Y() { std::cout << "constructor Y" << std::endl; }
Y::~Y() { std::cout << "destructor Y" << std::endl; }
X::Z(int a, int b) {return a+b;}
// X_main.cc:
#include...
2012 May 08
1
R CMD check linking errors, when interfacing c++
...s.
The relevant c++ source from conf-infomap.cpp:
#include "conf-infomap.h"
#include "R.h" // R functions
#include "Rinternals.h"
#include "Rmath.h" // R math
#include "Rdefines.h"
using namespace std;
using std::cout;
using std::cin;
using std::endl;
[...]
extern "C" {
void RosvallDynamicSkeleton(int *seed,char** file, int *attempts, int
*resamples, double *conf) {
int ret = confInfomap(seed[0],file,attempts[0],resamples[0],conf[0]);
if(ret == 0)
Rprintf("cluster map has been written to %s\n", file[0]);
R_FlushConsole(...
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
...e::get(Type::getInt32Ty(*ctx3),
false), llvm::Function::ExternalLinkage, "f3", module3);
// merge f1 <- f2
Result = Linker::LinkModules(module1, module2, [&](const
DiagnosticInfo &DI) {DI.print(DP);});
cout << "merge result=" << Result << endl;
delete ctx2;
cout << "--done merge #1--" << endl;
// merge f3 <- f1
Result = Linker::LinkModules(module3, module1, [&](const
DiagnosticInfo &DI) {DI.print(DP);});
cout << "merge result=" << Result << endl;
delete ctx1...
2004 Jun 09
1
About dll from c++ routine
...e 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 Y y;
X::X() { std::cout << "constructor X" << std::endl; }
X::~X() { std::cout << "destructor X" << std::endl; }
Y::Y() { std::cout << "constructor Y" << std::endl; }
Y::~Y() { std::cout << "destructor Y" << std::endl; }
// X_main.cc:
#include "X.hh"
extern "C" {
v...
2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...,213 +37,80 @@ using namespace std;
using qpid::management::Manageable;
namespace _qmf = qmf::com::redhat::matahari;
-ostream& operator<<(ostream &output, const HostWrapper& host)
+void
+HostAgent::setup(ManagementAgent* agent)
{
- output << "Node" << endl << endl;
- output << "UUID: " << host.uuid << endl;
- output << "Hostname: " << host.hostname << endl;
- output << "Memory: " << host.memory << endl;
- output << "Hypervisor: " <...