Displaying 20 results from an estimated 47 matches for "lower_bound".
2006 Oct 28
3
better seeking
...:49:18 -0000 1.117
+++ stream_decoder.c 28 Oct 2006 17:12:19 -0000
@@ -2923,18 +2923,18 @@
FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound;
+ FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ int i;
unsigned approx_bytes_per_frame;...
2004 Sep 10
2
better seeking
...-26 19:41:51.000000000 +0100
+++ src/libFLAC/seekable_stream_decoder.c 2003-07-09 23:49:35.000000000 +0200
@@ -816,11 +816,11 @@
FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint...
2005 Jan 25
0
bitbuffer optimizations
...orig 2005-01-25 05:18:31.000000000 +0100
+++ seekable_stream_decoder.c 2005-01-25 23:39:03.000000000 +0100
@@ -857,11 +857,11 @@
FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint...
2006 Nov 03
2
better seeking
...0 1.117
+++ src/libFLAC/stream_decoder.c 3 Nov 2006 08:32:35 -0000
@@ -2923,23 +2923,23 @@
FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample, this_frame_sample;
+ FLAC__int64 pos = -1;
+...
2004 Sep 10
4
bitbuffer optimizations
Ok, here is a patch waiting for new CVS :). It works fine for me, but
please check it before commiting...
--
Miroslav Lichvar
-------------- next part --------------
--- src/libFLAC/bitbuffer.c.orig 2003-01-30 17:36:01.000000000 +0100
+++ src/libFLAC/bitbuffer.c 2003-01-30 21:53:18.000000000 +0100
@@ -51,6 +51,25 @@
*/
static const unsigned FLAC__BITBUFFER_DEFAULT_CAPACITY = ((65536 - 64) *
2013 Jul 04
4
[LLVMdev] llvm (hence Clang) not compiling with Visual Studio 2008
Hello,
I have just updated my svn copy of the llvm/clang repositories after quite
a long time of inactivity, and found it not compiling on Windows with
Visual Studio 2008.
The incriminated file is:
llvm/lib/MC/MCModule.cpp
Where several calls to "std::lower_bound" are made, like:
atom_iterator I = std::lower_bound(atom_begin(), atom_end(),
Begin, AtomComp);
With:
- "atom_iterator" being a typedef on "std::vector<llvm::Atom*>::iterator"
- "atom_begin()" and "atom_end&q...
2013 Jul 04
0
[LLVMdev] [cfe-dev] llvm (hence Clang) not compiling with Visual Studio 2008
...> I have just updated my svn copy of the llvm/clang repositories after quite
> a long time of inactivity, and found it not compiling on Windows with
> Visual Studio 2008.
>
> The incriminated file is:
>
> llvm/lib/MC/MCModule.cpp
>
> Where several calls to "std::lower_bound" are made, like:
>
> atom_iterator I = std::lower_bound(atom_begin(), atom_end(),
> Begin, AtomComp);
>
> With:
> - "atom_iterator" being a typedef on "std::vector<llvm::Atom*>::iterator"
> - "atom_b...
2008 Apr 02
4
[LLVMdev] Comparison mismatch causes assert using VStudio STL
...this case, it makes a lot of sense given
that the second in the pair is just a pointer.
In LiveIntervals::runOnMachineFunction, the map is sorted with this:
std::sort(Idx2MBBMap.begin(), Idx2MBBMap.end(), Idx2MBBCompare());
Ok so far.
Here is where the problem arises:
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), LR.start);
By omitting the explicit comparator operator, the default is used which
looks at second. Not a huge problem in general, since you don't really
care that the pointers are sorted.
Visual Studio's debug STL, however, is quite the stickl...
2013 Jul 06
3
[LLVMdev] Host compiler requirements: Dropping VS 2008, using C++11?
Hi all,
A few days ago, there was a report of LLVM not compiling on VS 2008,
because of asymmetric std::lower_bound comparators not supported
there.
As noted by a few people, maybe it's time to drop VS 2008
compatibility and move the requirements to VS 2010?
While there, what about going further and starting using C++11? Now
seems as good a time as ever; my takeaway from that few months old
discussion was...
2013 Jul 06
0
[LLVMdev] [cfe-dev] llvm (hence Clang) not compiling withVisual Studio 2008
There is some historical precedence for fixing the problem with VS
lower_bound by changing the LLVM source - when I first got LLVM to compile
with Visual Studio, patches for unsymmetric operator < were accepted into
the LLVM repo, and I believe it's been done several times after that as
well.
m.
>From: Ahmed Bougacha
>Sent: Friday, July 05, 2013 1:43 AM
>...
2009 Apr 16
2
[LLVMdev] Patch: MSIL backend global pointers initialization
...struct
> function type after that.
>
So what do you think about that:
// CallSites have equal signatures
bool MSILWriter::cmpCallSite(CallSite A, CallSite B) {
return (getCallSiteFType(A)==getCallSiteFType(B) &&
A.getAttributes()==B.getAttributes());
}
// Comparision for std::lower_bound used in MSILWriter::printExternals()
bool MSILWriter::compareCallSite(CallSite A, CallSite B) {
return getCallSiteFType(A)<getCallSiteFType(B);
}
// Constructs function type from given CallSite
FunctionType* MSILWriter::getCallSiteFType(CallSite CS) {
std::vector<const Type *> params;...
2011 Sep 12
0
[LLVMdev] multi-threading in llvm
Hi Alexandra,
I don't know much, maybe this topic should be bridged with polly-dev
(adding it to CC) to bring it more attention.
Indeed, polly uses ScopPass, that creates serious limitations in
compatibility with other passes. To my understanding, scops are used
because ISL loop analysis tool uses scops. In fact, just for handling
OpenMP directives scops are not required, unless one need to
2009 Apr 03
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur
Minor comments:
> +// Comparision for std::lower_bound used in
> MSILWriter::printExternals()
> +static bool CompareInstructions(Instruction *A,Instruction *B)
> +{
Put brace on the same line as function def.
> + if ( !F->use_empty() ) // Print only if used
> + {
Likewise. Plus use "if (foo)" instead of &quo...
2006 Jan 26
0
[LLVMdev] VS2005 patches
In the VS2005 debug std libraries, the lower_bound algorithm uses a
function known as _DEBUG_LT. The problem with this is that it asserts
that if a < b then !(b < a). It also asserts that the input is actually
sorted by using < to compare the elements.
In LLVM there are a couple of places where the lower_bound algorithm is
used with a low...
2007 Jul 10
1
[LLVMdev] VirtRegMap GLIBCXX assert
...ack() is called on an empty container:
/// addLastUse - Add the last use information of all stack slots whose
/// values are available in the specific register.
void addLastUse(unsigned PhysReg, MachineInstr *Use) {
std::multimap<unsigned, int>::iterator I =
PhysRegsAvailable.lower_bound(PhysReg);
while (I != PhysRegsAvailable.end() && I->first == PhysReg) {
int Slot = I->second;
I++;
std::map<int, SSInfo>::iterator II = SpillSlotsAvailable.find(Slot);
assert(II != SpillSlotsAvailable.end() && "Slot not available!")...
2013 Jul 06
0
[LLVMdev] [cfe-dev] Host compiler requirements: Dropping VS 2008, using C++11?
...ause it's likely to be a bit more in-depth, but I'm in
favor of it.
~Aaron
On Sat, Jul 6, 2013 at 12:05 PM, Ahmed Bougacha
<ahmed.bougacha at gmail.com> wrote:
> Hi all,
>
> A few days ago, there was a report of LLVM not compiling on VS 2008,
> because of asymmetric std::lower_bound comparators not supported
> there.
>
> As noted by a few people, maybe it's time to drop VS 2008
> compatibility and move the requirements to VS 2010?
>
> While there, what about going further and starting using C++11? Now
> seems as good a time as ever; my takeaway from th...
2009 Apr 16
0
[LLVMdev] Patch: MSIL backend global pointers initialization
...eFType(B) &&
> A.getAttributes()==B.getAttributes());
> }
As it is impossible to honour argument attributes in MSIL I don't see
why you should compare attributes. You seems to have the same MSIL
call signature for calls with different param attrs.
> // Comparision for std::lower_bound used in MSILWriter::printExternals()
> bool MSILWriter::compareCallSite(CallSite A, CallSite B) {
> return getCallSiteFType(A)<getCallSiteFType(B);
> }
Hrm... You're building type for each comparison, which seems to be
quite inefficient. Why don't iterate over all variadic cal...
2011 Sep 08
4
[LLVMdev] multi-threading in llvm
Hi,
I want to execute the iterations of a loop in parallel, by inserting calls either to pthreads or to the gomp library at the LLVM IR level. As a first step, I inserted an omp pragma in a C file and compiled it with llvm-gcc to check the generated LLVM code. If I understand correctly, to parallelize the loop in LLVM IR, I have to separate the loop in a new function, put all required parameters
2006 Nov 06
2
better seeking
...av Lichvar
> > --- flac/src/libFLAC/stream_decoder.c.orig 2006-11-03
> 18:52:38.104291323 +0100
> +++ flac/src/libFLAC/stream_decoder.c 2006-11-03 18:53:41.350727144
> +0100
> @@ -2995,7 +2995,7 @@
>
> while(1) {
> /* check if the bounds are still ok */
> - if (lower_bound_sample + FLAC__MIN_BLOCK_SIZE > upper_bound_sample
> || lower_bound > upper_bound) {
> + if (lower_bound_sample >= upper_bound_sample || lower_bound >
> upper_bound) {
> decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
> return false;
> }...
2016 Jun 22
2
[GSoC 2016] Enabling Polyhedral Optimizations in Julia - Midterm Report
...iscussed in the bug report at [6].
It was possible to solve
this problem and I will shortly supply a patch for this. Another language
construct that is lowered to
LLVM IR that limits the optimization potential are Julia's `StepRange`s.
More concretely, this regards
loops of the form `for i = lower_bound:step:upper_bound`. They will prevent
optimizations especially
when occurring inside other loops.
*2. Next steps:*
It is planned to complete the analysis of Polly on Julia code on the
existing benchmarks and solve the
problems mentioned above. Furthermore, I plan to extend the analysis to
find...