Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: courgette/difference_estimator.cc

Issue 399313006: Move bit_cast from base/macros.h to its own header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile after r368203 Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // We want to measure the similarity of two sequences of bytes as a surrogate 5 // We want to measure the similarity of two sequences of bytes as a surrogate
6 // for measuring how well a second sequence will compress differentially to the 6 // for measuring how well a second sequence will compress differentially to the
7 // first sequence. 7 // first sequence.
8 8
9 #include "courgette/difference_estimator.h" 9 #include "courgette/difference_estimator.h"
10 10
11 #include <stddef.h> 11 #include <stddef.h>
12 #include <stdint.h> 12 #include <stdint.h>
13 #include <string.h>
13 14
14 #include "base/containers/hash_tables.h" 15 #include "base/containers/hash_tables.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 17
17 namespace courgette { 18 namespace courgette {
18 19
19 // Our difference measure is the number of k-tuples that occur in Subject that 20 // Our difference measure is the number of k-tuples that occur in Subject that
20 // don't occur in Base. 21 // don't occur in Base.
21 const int kTupleSize = 4; 22 const int kTupleSize = 4;
22 23
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 119
119 if (mismatches == 0) { 120 if (mismatches == 0) {
120 if (RegionsEqual(base->region(), subject->region())) 121 if (RegionsEqual(base->region(), subject->region()))
121 return 0; 122 return 0;
122 } 123 }
123 ++mismatches; // Guarantee not zero. 124 ++mismatches; // Guarantee not zero.
124 return mismatches; 125 return mismatches;
125 } 126 }
126 127
127 } // namespace 128 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | gpu/command_buffer/tests/gl_readback_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698