search for: current_po

Displaying 20 results from an estimated 23 matches for "current_po".

Did you mean: current_pos
2003 Dec 14
1
compile error with C code and standalone R math C library
...************** rr-sa.c ********************************************************************** #include <stdio.h> #include <assert.h> #define T 3 #define INITVAL 1 #define MATHLIB_STANDALONE #define THETA 2 #include <Rmath.h> #include <time.h> void advance(double *node, int *current_pos, double newval); void retreat(double *node, int *current_pos); double new_val(double *node, double theta, int current_pos); double accept_prob(double *node, double theta, int current_pos); double accept_prob_fn(double a, double y); int main() { int currentpos = 0; int i; double newval, nod...
2009 Dec 17
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...fferArray. + /// + char *Cur; + + /// printLog - Dump the contents of the buffer to Stream. + /// + void printLog(void) { + TheStream->write(BufferArray, BufferSize); + Cur = BufferArray; + } + + virtual void write_impl(const char *Ptr, size_t Size); + + /// current_pos - Return the current position within the stream, + /// not counting the bytes currently in the buffer. + virtual uint64_t current_pos() { + // This has the same effect as calling TheStream.current_pos(), + // but that interface is private. + return TheStream->tell() - TheS...
2009 Dec 18
4
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Friday 18 December 2009 12:28, Chris Lattner wrote: > This is looking a lot better, here are some more comments: > > + /// current_pos - Return the current position within the stream, > > + /// not counting the bytes currently in the buffer. > > + virtual uint64_t current_pos() { > > I didn't notice this earlier, but is there any reason for current_pos to be > non-const in raw_ostream? Probably not...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...> Please make BufferSize an 'unsigned' and default it to 8192. Please use >>> PRESERVE_STREAM instead of 'false'. > > Here's an updated version of the circular buffer. Ok to check in? This is looking a lot better, here are some more comments: > + /// current_pos - Return the current position within the stream, > + /// not counting the bytes currently in the buffer. > + virtual uint64_t current_pos() { I didn't notice this earlier, but is there any reason for current_pos to be non-const in raw_ostream? > + /// circular_raw_ostream...
2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...fferArray. + /// + char *Cur; + + /// printLog - Dump the contents of the buffer to Stream. + /// + void printLog(void) { + TheStream->write(BufferArray, BufferSize); + Cur = BufferArray; + } + + virtual void write_impl(const char *Ptr, size_t Size); + + /// current_pos - Return the current position within the stream, + /// not counting the bytes currently in the buffer. + virtual uint64_t current_pos() { + // This has the same effect as calling TheStream.current_pos(), + // but that interface is private. + return TheStream->tell() - TheS...
2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...fferArray. + /// + char *Cur; + + /// printLog - Dump the contents of the buffer to Stream. + /// + void printLog(void) { + TheStream->write(BufferArray, BufferSize); + Cur = BufferArray; + } + + virtual void write_impl(const char *Ptr, size_t Size); + + /// current_pos - Return the current position within the stream, + /// not counting the bytes currently in the buffer. + virtual uint64_t current_pos() { + // This has the same effect as calling TheStream.current_pos(), + // but that interface is private. + return TheStream->tell() - TheS...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...fferArray. + /// + char *Cur; + + /// printLog - Dump the contents of the buffer to Stream. + /// + void printLog(void) { + TheStream->write(BufferArray, BufferSize); + Cur = BufferArray; + } + + virtual void write_impl(const char *Ptr, size_t Size); + + /// current_pos - Return the current position within the stream, + /// not counting the bytes currently in the buffer. + virtual uint64_t current_pos() { + // This has the same effect as calling TheStream.current_pos(), + // but that interface is private. + return TheStream->tell() - TheS...
2009 Dec 19
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Dec 18, 2009, at 11:53 AM, David Greene wrote: > On Friday 18 December 2009 12:28, Chris Lattner wrote: > >> This is looking a lot better, here are some more comments: >>> + /// current_pos - Return the current position within the >>> stream, >>> + /// not counting the bytes currently in the buffer. >>> + virtual uint64_t current_pos() { >> >> I didn't notice this earlier, but is there any reason for >> current_pos to be >...
2009 Dec 19
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...TheStream->write(BufferArray, BufferSize); > + Cur = BufferArray; > + } If the buffer has circled around, won't this print it out-of-order? If the current pointer is 5 and the length is 10, it seems like this should do a write([5..9]) then write([0..4])? > + /// current_pos - Return the current position within the stream, > + /// not counting the bytes currently in the buffer. > + virtual uint64_t current_pos() { This is now const on mainline. > + public: > + /// circular_raw_ostream - Open the specified file for > + /// writing. This i...
2009 Dec 19
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...buffer has circled around, won't this print it out-of-order? > If the current pointer is 5 and the length is 10, it seems like this > should do a write([5..9]) then write([0..4])? Aha! Good catch. This worked differently in our implementation here. I'll fix it. > > + /// current_pos - Return the current position within the stream, > > + /// not counting the bytes currently in the buffer. > > + virtual uint64_t current_pos() { > > This is now const on mainline. Ok. > > + public: > > + /// circular_raw_ostream - Open the specified file...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Friday 18 December 2009 13:53, David Greene wrote: > > > + void releaseStream() { > > > + // Delete the stream if needed. Otherwise, transfer the buffer > > > + // settings from this raw_ostream back to the underlying stream. > > > + if (!TheStream) > > > + return; > > > + if (DeleteStream) > > > +
2009 Dec 16
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Wednesday 16 December 2009 13:19, Chris Lattner wrote: > + int BufferSize; > + std::vector<char> BufferArray; > + bool DelayOutput; > + std::vector<char>::iterator Cur; > > Please doxygenify these. Ok. > Instead of using a std::vector for BufferArray, please just new[] an array > since it is fixed size. Ok. > Why is BufferSize needed with
2009 Dec 21
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...tion of the buffer. + TheStream->write(Cur, BufferArray + BufferSize - Cur); + // Write the newer portion of the buffer. + TheStream->write(BufferArray, Cur - BufferArray); + Cur = BufferArray; + } + + virtual void write_impl(const char *Ptr, size_t Size); + + /// current_pos - Return the current position within the stream, + /// not counting the bytes currently in the buffer. + virtual uint64_t current_pos() const { + // This has the same effect as calling TheStream.current_pos(), + // but that interface is private. + return TheStream->tell()...
2009 Dec 16
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Dec 16, 2009, at 8:12 AM, David Greene wrote: >>> >>> What, specifically, do you want reviewed before I start checking in? >>> I'll be happy to prepare a patch that shows just that. >> >> I want a patch that does one thing (e.g. implements dbgs(), > > Ok, let's start with that. Here's the patch to add the circular raw_ostream. This
2003 Oct 16
2
A view quirks
Aloha Timo. I found a few odd things while playing with dovecot. At least one of them bugs me, but it might be a result of my own patches - I haven't testet it with mbox or maildir, yet. The details :) 1. * OK dovecot ready. A = (<return> Connection closed by foreign host. 2. * OK dovecot ready. A001 LOGIN xxxxxx xxxxxx A001 OK Logged in. A002 COPY 1 INBOX Connection closed by
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...This class does not encounter output errors. +class raw_char_ostream : public raw_pwrite_stream { + void write_impl(const char *Ptr, size_t Size) override{}; + void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) override { + memcpy(OutBufStart + Offset, Ptr, Size); + } + uint64_t current_pos() const override { return 0; } + void grow(size_t Size); + +public: + explicit raw_char_ostream(char *Buffer, unsigned BufferSize) { + if (Buffer) { + SetBufferAndMode(Buffer, BufferSize, ExternalBuffer); + } else { + if (!BufferSize) + BufferSize = preferred_buffer_size()...
2020 Apr 23
7
Cannot build master
Hi, Using master at b0a1c0b72c9c61f8b0a223e08f43498abb64f5e8, I cannot build LLVM. I configured with: CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm11-git \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DBUILD_SHARED_LIBS=OFF \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \
2010 Sep 01
0
[LLVMdev] MC-JIT Streamer 1/3
...n_sjodin at yahoo.com> Cc: "Daniel Dunbar" <daniel at zuster.org>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Date: Saturday, August 21, 2010, 8:39 AM Hi Jan, Just a random comment, the indentation in mem_raw_ostream::write_impl and mem_raw_ostream::current_pos should also be 2 spaces instead of 4! On Fri, Aug 20, 2010 at 12:38 PM, Jan Sjodin <jan_sjodin at yahoo.com> wrote: > I was delayed creating the smaller patches, but finally I had some time to put the first set together. There are three small patches, the first two are classes the MCJITS...
2010 Aug 20
1
[LLVMdev] MC-JIT Streamer 1/3
I was delayed creating the smaller patches, but finally I had some time to put the first set together. There are three small patches, the first two are classes the MCJITStreamer uses, and the last patch is the MCJITStreamer class itself. - Jan --- On Sun, 8/1/10, Daniel Dunbar <daniel at zuster.org> wrote: > From: Daniel Dunbar <daniel at zuster.org> > Subject: Re: [LLVMdev]
2015 May 22
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...r *Ptr, size_t Size, uint64_t Offset) override { + memcpy(OS.data() + Offset, Ptr, Size); + } - void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) override; - /// Return the current position within the stream, not counting the bytes /// currently in the buffer. - uint64_t current_pos() const override; + uint64_t current_pos() const override { return OS.size(); } -protected: - // Like the regular constructor, but doesn't call init. - explicit raw_svector_ostream(SmallVectorImpl<char> &O, unsigned); - void init(); - public: /// Construct a new raw_svector...