search for: ifstream

Displaying 20 results from an estimated 30 matches for "ifstream".

Did you mean: fstream
2019 Aug 27
2
Orc JIT vs. STL
...enerator. But it is added recently though On Tue, 27 Aug 2019 at 21:02, Praveen Velliengiri < praveenvelliengiri at gmail.com> wrote: > Hi Geoff, > I tried it, but I can't able to reproduce it. > > Test Program: > #include <fstream> > int main() > { > std::ifstream stream1, stream2; > stream1.swap(stream2); > return 0; > } > > I didn't get undefined symbols error. I used > DynamicLibrarySearchGenerator::GetForCurrentProcess API to make symbols > from STL visible to ORC JIT. > > On Tue, 27 Aug 2019 at 20:36, Geoff Levner <gl...
2018 Nov 30
1
Xapian Benchmark results
...pian::Stem stemmer("english"); indexer.set_stemmer(stemmer); // doc.set_data("content"); indexer.set_stemming_strategy(Xapian::TermGenerator::STEM_SOME); Xapian::WritableDatabase database = *db; try{ for(i=0;i<documents.size();++i) { ifstream file; file.open(documents[i]); line_string = ""; while(file.good()) { file.getline(line, sizeof(line)); string str(line); if(!str.empty()) {...
2019 Aug 27
2
Orc JIT vs. STL
...from external libraries, we add them via DynamicLibrary::LoadLibraryPermanently(). >> >> The problem we have run into recently is when a module calls a function from the STL -- in particular this swap() function for input streams: >> >> #include <fstream> >> std::ifstream stream1, stream2; >> stream1.swap(stream2); >> >> When we run the constructors for the module, we get two undefined symbols. And explicitly adding libstdc++ doesn't help. It turns out that the missing symbols are defined not in the runtime DSO but in an archive file: >>...
2004 Dec 02
7
A possible way to reduce basic questions
Jim Lemon <bitwrit <at> ozemail.com.au> writes: > I have been thinking about how to reduce the number of basic questions that > elicit the ...ahem... robust debate that has occurred about how to answer The traffic on r-help could be reduced by creating a second list where more elementary questions are asked. There may be other ways to partition the universe of questions
2019 Aug 27
4
Orc JIT vs. STL
...n the fly. If a C++ module calls functions from external libraries, we add them via DynamicLibrary::LoadLibraryPermanently(). The problem we have run into recently is when a module calls a function from the STL -- in particular this swap() function for input streams: #include <fstream> std::ifstream stream1, stream2; stream1.swap(stream2); When we run the constructors for the module, we get two undefined symbols. And explicitly adding libstdc++ doesn't help. It turns out that the missing symbols are defined not in the runtime DSO but in an archive file: /opt/rh/devtoolset-6/root/usr/lib/...
2010 Mar 17
2
[LLVMdev] Understanding tail calls
...t;char,std::char_traits<char>,std::allocator<char> >"* %fn, i64 0, i32 0, i32 0 ; <i8**> [#uses=1] %1 = load i8** %0, align 8 ; <i8*> [#uses=1] %2 = getelementptr inbounds %struct.FCEmailInputFile* %this, i64 0, i32 1 ; <%"struct.std::ifstream"*> [#uses=1] %3 = getelementptr inbounds %struct.FCEmailInputFile* %this, i64 0, i32 1, i32 1 ; <%"struct.std::basic_filebuf<char,std::char_traits<char> >"*> [#uses=1] %4 = tail call %"struct.std::basic_filebuf<char,std::char_traits<char> >&q...
2011 Jan 17
2
[LLVMdev] File reading in LLVM 2.8
...llo/Release/Hello.o: relocation R_X86_64_PC32 against undefined symbol `(anonymous namespace)::Hello::update_sec_read(char const*)' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status I have used simple ifstream code - void update_sec_read (const char* Filename) { std::ifstream In(Filename); if (!In.good()) { errs() << "couldn't load file '" << Filename << "'!\n"; return; } while (In) { } } Can anyone please help me out? - Abhirup Gh...
2010 Apr 21
1
[PATCH matahari] Created a new platform-abstraction layer named Platform.
...entries = udev_enumerate_get_list_entry(enumerator); + struct udev_list_entry* entry; + + udev_list_entry_foreach(entry, entries) + { + core_count++; + } + set_number_of_cores(core_count); + } + + udev_enumerate_unref(enumerator); + udev_unref(udev); + + ifstream input("/proc/cpuinfo"); + if(input.is_open()) + { + string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)"; + int expected = 3; + int found[expected * 3]; + const char* pcre_error; + int pcre_error_offset; + pcre* regex; + bool done = false; + bo...
2010 Mar 17
0
[LLVMdev] Understanding tail calls
...::char_traits<char>,std::allocator<char> >"* %fn, i64 0, i32 0, i32 0 ; <i8**> [#uses=1] > %1 = load i8** %0, align 8 ; <i8*> [#uses=1] > %2 = getelementptr inbounds %struct.FCEmailInputFile* %this, i64 0, i32 1 ; <%"struct.std::ifstream"*> [#uses=1] > %3 = getelementptr inbounds %struct.FCEmailInputFile* %this, i64 0, i32 1, i32 1 ; <%"struct.std::basic_filebuf<char,std::char_traits<char> >"*> [#uses=1] > %4 = tail call %"struct.std::basic_filebuf<char,std::char_traits<char&...
2010 Apr 19
1
[PATCH matahari] Replaces the existing HAL code for ProcessorAgent with udev.
...)) + { + struct udev_list_entry* entries = udev_enumerate_get_list_entry(enumerator); + struct udev_list_entry* entry; + + udev_list_entry_foreach(entry, entries) + { + core_count++; + } + } + + udev_enumerate_unref(enumerator); + udev_unref(udev); + + ifstream input("/proc/cpuinfo"); + if(input.is_open()) + { + string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)"; + int expected = 3; + int found[expected * 3]; + const char* pcre_error; + int pcre_error_offset; + pcre* regex; + bool done = false; + bo...
2013 Mar 11
0
[LLVMdev] YAML IO problems
...mapping(IO &io, FooBar& fb) { io.mapRequired("bool_test", fb.boolTest); io.mapRequired("directory", fb.directory); io.mapRequired("suffix", fb.suffix); io.mapRequired("int_test", fb.intTest); } }; } } int main() { ifstream jsonFile("yaml.json"); if (jsonFile.is_open()) { // Read file into a string string jsonSource((istreambuf_iterator<char>(jsonFile)), istreambuf_iterator<char>()); jsonFile.close(); FooBar doc; Input yin(jsonSource.c_str());...
2012 Nov 27
1
Problems with MinGW and boost on Windows
Hi, I am not sure how widespread this problem is, but definitely occurs for me on 64 bit Win 7 with a 64 bit R. I think I have isolated the issue (to a certain extent) in the attached Test.cpp file. Basically, I think linking with boost serialization is causing the plugin to fail. If I compile Test.cpp with line 43 (Dummy* Read() ...) commented out, I get the expected output in R: >
2003 Jun 13
2
Trouble decoding number of codebooks
...hand? I read in the sync pattern, and I think the codebook dimensions properly, but when I try and read in the number of codebook entries, I get a number larger than the number of bytes in the file, which I have to assume is wrong :) Anyway this is how I read in the numbers : void readCodeBooks(ifstream *file, int codebookCount) { //read in the 24 bit sync pattern unsigned char *c = readBytes(file, 3); //read the codebook dimensions unsigned char *dimensions = readBytes(file,2); int codebookDimensions = (int)convertArray2(dimensions, 2); //read codebook entries unsigned char *entri...
2015 Jul 26
1
Get term from document by position
...+ 1 << ": " << i.get_weight() << " docid=" << *i // << " [" << i.get_document().get_data() << "]\n\n"; } //saves content of text.txt to text_str // void MyText::set_string() { text_str=""; std::ifstream myfile ("text.txt"); std::string line; if (myfile.is_open()) { while ( std::getline (myfile,line) ) { text_str=text_str+" "+line; } myfile.close(); } else { std::cout << "Unable to open file text.txt"; exit(1); } }
2011 Aug 09
2
Feed decoder from c++ std::stream
...r defined filters. The filters basically all derive from some base filter and have methods start(), update() and finish(). The start routine performs any initialization required by the filter, and finish() does the clean up. In between, I simply read the file piece by piece into a buffer using std::ifstream.read(buffer, bufsize), and then call the filters update function with the buffer and the number of bytes read. In this fashion I have implemented a WAV reader, WAV writer, MD5 summer, AccurateRip checker and a FLAC encoder and hope to implement MP3 and Vorbis encoders and any number of audio filte...
2010 May 13
0
[PATCH matahari] Moving QMF functionality into a transport layer.
...string uuid = "Unknown"; - string hostname = "Unknown"; - string hypervisor = "Unknown"; - string architecture = "None"; - unsigned long memory = 0; - bool beeping = false; +string +Host:: get_uuid() const +{ + return _uuid; +} - ifstream input("/var/lib/dbus/machine-id"); +void +Host::set_hostname(const string hostname) +{ + _hostname = hostname; +} - if(input.is_open()) - { - getline(input, uuid); - input.close(); - } +string +Host::get_hostname() const +{ + return _hostname; +} - if(!uname(&d...
2020 Sep 11
0
Wine release 5.17
...www.winehq.org/git for details. Wine is available thanks to the work of many people. See the file AUTHORS in the distribution for the complete list. ---------------------------------------------------------------- Bugs fixed in 5.17 (total 17): 22616 Multiple applications need msvcirt.dll.??0ifstream@@QAE at PBDHH@Z (Merriam-Webster Dictionary, Power Tab Editor, gmax 1.2, GradeBook for Windows, Microsoft Reader) 24182 Multiple games need IDirectDrawMediaStream::Get/SetFormat implementation (Need for Russia, Motocross Madness 2, The Sims Complete Collection) 30014 Multiple programs require...
2006 Aug 06
0
Newbie: How to rewind a videostream (long)
...StreamState; ogg_stream_state theoraStreamState; theora_info theoraInfo; theora_comment theoraComment; theora_state theoraState; int theoraPageCount; yuv_buffer yuvBuffer; std::ifstream videoStream; void rewind (); void initMovie (); void exitMovie (); int buffer_data (); int queue_page (ogg_page *oggPage); void dec...
2010 May 19
2
Squashed commits...
Refactoring the previous patch ended up creating two deltas. This patch pushes them both together into a single commit.
2010 Mar 16
0
[PATCH] Added the new Processors agent.
...: + _qmf::ArgsProcessorsGet_load_average& loadavg = (_qmf::ArgsProcessorsGet_load_average&) args; + loadavg.o_ret = get_load_average(); + return STATUS_OK; + } + + return STATUS_NOT_IMPLEMENTED; +} + +double +ProcessorsAgent::get_load_average(void) +{ + double result; + ifstream input; + + input.open("/proc/loadavg", ios::in); + input >> result; + input.close(); + + return result; +} diff --git a/src/processors.h b/src/processors.h new file mode 100644 index 0000000..f854f1d --- /dev/null +++ b/src/processors.h @@ -0,0 +1,48 @@ +/* processor.h - Copyrig...