Home
last modified time | relevance | path

Searched refs:Crc32 (Results 1 – 25 of 43) sorted by relevance

12

/external/pigweed/pw_checksum/
Dcrc32_test.cc41 TEST(Crc32, Empty) { in TEST() argument
42 EXPECT_EQ(Crc32::Calculate(std::span<std::byte>()), PW_CHECKSUM_EMPTY_CRC32); in TEST()
45 TEST(Crc32, Buffer) { in TEST() argument
46 EXPECT_EQ(Crc32::Calculate(std::as_bytes(std::span(kBytes))), kBufferCrc); in TEST()
49 TEST(Crc32, String) { in TEST() argument
50 EXPECT_EQ(Crc32::Calculate(std::as_bytes(std::span(kString))), kStringCrc); in TEST()
54 Crc32 crc; in TEST()
62 Crc32 crc32; in TEST()
68 Crc32 crc32; in TEST()
75 Crc32 crc32; in TEST()
Ddocs.rst38 .. cpp:function:: uint32_t Crc32(span<const std::byte> data)
45 uint32_t crc = Crc32(my_data);
47 .. cpp:function:: uint32_t Crc32(span<const std::byte> data, uint32_t previous_result)
54 uint32_t crc = Crc32(my_data);
55 crc = Crc32(more_data, crc);
/external/icing/icing/util/
Dcrc32_test.cc49 Crc32 crc32_test{10}; in TEST()
50 Crc32 crc32_test_empty{}; in TEST()
63 Crc32 crc32_test(~foo_crc); in TEST()
68 Crc32 crc32_foobar{}; in TEST()
70 Crc32 crc32_foo_and_bar{}; in TEST()
83 Crc32 crc32_test{}; in TEST()
Dcrc32.h31 class Crc32 {
34 Crc32() : crc_(0) {} in Crc32() function
36 explicit Crc32(uint32_t init_crc) : crc_(init_crc) {} in Crc32() function
38 inline bool operator==(const Crc32& other) const {
Dcrc32.cc39 uint32_t Crc32::Get() const { return crc_; } in Get()
41 uint32_t Crc32::Append(const std::string_view str) { in Append()
46 libtextclassifier3::StatusOr<uint32_t> Crc32::UpdateWithXor( in UpdateWithXor()
/external/icing/icing/file/
Dfile-backed-vector_test.cc107 EXPECT_THAT(vector->ComputeChecksum(), IsOkAndHolds(Crc32(0))); in TEST_F()
115 const Crc32 good_crc(good_crc_value); in TEST_F()
163 EXPECT_THAT(vector->ComputeChecksum(), IsOkAndHolds(Crc32(0))); in TEST_F()
175 EXPECT_THAT(vector->ComputeChecksum(), IsOkAndHolds(Crc32(0))); in TEST_F()
203 EXPECT_THAT(vector->ComputeChecksum(), IsOkAndHolds(Crc32(2620640643U))); in TEST_F()
212 ICING_ASSERT_OK_AND_ASSIGN(Crc32 incremental_crc, in TEST_F()
216 Crc32 full_crc; in TEST_F()
242 EXPECT_THAT(vector->ComputeChecksum(), IsOkAndHolds(Crc32(2620640643U))); in TEST_F()
251 ICING_ASSERT_OK_AND_ASSIGN(Crc32 incremental_crc, in TEST_F()
255 Crc32 full_crc; in TEST_F()
[all …]
Dfile-backed-proto-log.h144 Crc32 crc; in CalculateHeaderChecksum()
348 libtextclassifier3::StatusOr<Crc32> ComputeChecksum();
384 static libtextclassifier3::StatusOr<Crc32> ComputeChecksum(
386 Crc32 initial_crc, int64_t start, int64_t end);
569 ICING_ASSIGN_OR_RETURN(Crc32 calculated_log_checksum, in InitializeExistingFile()
570 ComputeChecksum(filesystem, file_path, Crc32(), in InitializeExistingFile()
586 ComputeChecksum(filesystem, file_path, Crc32(), sizeof(Header), in InitializeExistingFile()
619 libtextclassifier3::StatusOr<Crc32> FileBackedProtoLog<ProtoT>::ComputeChecksum( in ComputeChecksum()
621 Crc32 initial_crc, int64_t start, int64_t end) { in ComputeChecksum()
624 Crc32 new_crc(initial_crc.Get()); in ComputeChecksum()
[all …]
Dportable-file-backed-proto-log.h130 Crc32 crc; in CalculateHeaderChecksum()
467 libtextclassifier3::StatusOr<Crc32> ComputeChecksum();
504 static libtextclassifier3::StatusOr<Crc32> ComputeChecksum(
506 Crc32 initial_crc, int64_t start, int64_t end);
748 Crc32 calculated_log_checksum, in InitializeExistingFile()
749 ComputeChecksum(filesystem, file_path, Crc32(), in InitializeExistingFile()
790 libtextclassifier3::StatusOr<Crc32>
793 Crc32 initial_crc, int64_t start, int64_t end) { in ComputeChecksum()
796 Crc32 new_crc(initial_crc.Get()); in ComputeChecksum()
1024 Crc32 crc(header_->GetLogChecksum()); in EraseProto()
[all …]
Dfile-backed-vector.h137 Crc32 crc; in CalculateHeaderChecksum()
262 libtextclassifier3::StatusOr<Crc32> ComputeChecksum();
454 Crc32 vector_checksum; in InitializeExistingFile()
654 libtextclassifier3::StatusOr<Crc32> FileBackedVector<T>::ComputeChecksum() { in ComputeChecksum()
659 Crc32 cur_crc(header_->vector_checksum); in ComputeChecksum()
757 ICING_ASSIGN_OR_RETURN(Crc32 checksum, ComputeChecksum()); in PersistToDisk()
Dfile-backed-proto.h170 Crc32 crc; in Read()
223 Crc32 crc; in Write()
/external/libtextclassifier/native/lang_id/common/math/
Dchecksum.cc28 uint32 Crc32::GetInitialCrc32() { in GetInitialCrc32()
33 void Crc32::Update(const char *str, int len) { in Update()
Dchecksum.h30 class Crc32 {
32 Crc32() : current_(GetInitialCrc32()) {} in Crc32() function
/external/icing/icing/schema/
Dschema-store.cc192 ICING_ASSIGN_OR_RETURN(Crc32 checksum, ComputeChecksum()); in InitializeDerivedFiles()
232 ICING_ASSIGN_OR_RETURN(Crc32 checksum, ComputeChecksum()); in RegenerateDerivedFiles()
250 libtextclassifier3::Status SchemaStore::UpdateHeader(const Crc32& checksum) { in UpdateHeader()
289 libtextclassifier3::StatusOr<Crc32> SchemaStore::ComputeChecksum() const { in ComputeChecksum()
290 Crc32 total_checksum; in ComputeChecksum()
296 Crc32 schema_checksum; in ComputeChecksum()
299 Crc32 schema_type_mapper_checksum = schema_type_mapper_->ComputeChecksum(); in ComputeChecksum()
452 ICING_ASSIGN_OR_RETURN(Crc32 checksum, ComputeChecksum()); in PersistToDisk()
Dschema-store.h235 libtextclassifier3::StatusOr<Crc32> ComputeChecksum() const;
280 libtextclassifier3::Status UpdateHeader(const Crc32& checksum);
/external/libchrome/base/metrics/
Dbucket_ranges.cc77 static uint32_t Crc32(uint32_t sum, HistogramBase::Sample value) { in Crc32() function
100 checksum = Crc32(checksum, ranges_[index]); in CalculateChecksum()
/external/pigweed/pw_checksum/public/pw_checksum/
Dcrc32.h68 class Crc32 {
76 constexpr Crc32() : state_(kInitialValue) {} in Crc32() function
/external/icing/icing/store/
Ddocument-store.cc390 ICING_ASSIGN_OR_RETURN(Crc32 checksum, ComputeChecksum()); in InitializeExistingDerivedFiles()
524 ICING_ASSIGN_OR_RETURN(Crc32 checksum, ComputeChecksum()); in RegenerateDerivedFiles()
657 libtextclassifier3::StatusOr<Crc32> DocumentStore::ComputeChecksum() const { in ComputeChecksum()
658 Crc32 total_checksum; in ComputeChecksum()
668 Crc32 document_log_checksum = std::move(checksum_or).ValueOrDie(); in ComputeChecksum()
670 Crc32 document_key_mapper_checksum = document_key_mapper_->ComputeChecksum(); in ComputeChecksum()
680 Crc32 document_id_mapper_checksum = std::move(checksum_or).ValueOrDie(); in ComputeChecksum()
690 Crc32 score_cache_checksum = std::move(checksum_or).ValueOrDie(); in ComputeChecksum()
700 Crc32 filter_cache_checksum = std::move(checksum_or).ValueOrDie(); in ComputeChecksum()
702 Crc32 namespace_mapper_checksum = namespace_mapper_->ComputeChecksum(); in ComputeChecksum()
[all …]
Dkey-mapper.h126 Crc32 ComputeChecksum();
310 Crc32 KeyMapper<T>::ComputeChecksum() { in ComputeChecksum()
311 return Crc32(trie_.UpdateCrc()); in ComputeChecksum()
/external/vboot_reference/firmware/lib/cgptlib/include/
Dcrc32.h10 uint32_t Crc32(const void *buffer, uint32_t len);
/external/libtextclassifier/native/lang_id/common/flatbuffers/
Dmodel-utils.cc147 void UpdateCrc(mobile::Crc32 *crc, const flatbuffers::Vector<T> *s, in UpdateCrc()
171 mobile::Crc32 crc; in ComputeCrc2Checksum()
/external/vboot_reference/firmware/lib/cgptlib/
Dcrc32.c102 uint32_t Crc32(const void *buffer, uint32_t len) in Crc32() function
Dcgptlib_internal.c60 crc32 = Crc32((const uint8_t *)h, h->size); in HeaderCrc()
168 crc32 = Crc32((const uint8_t *)entries, in CheckEntries()
417 header->entries_crc32 = Crc32(gpt->primary_entries, in GptModified()
/external/vboot_reference/tests/
Dcrc32_test.c44 crc32 = Crc32(cases[i].vector, cases[i].len); in TestCrc32TestVectors()
/external/pigweed/pw_hdlc/public/pw_hdlc/internal/
Dencoder.h57 checksum::Crc32 fcs_;
/external/icing/icing/index/lite/
Dlite-index.cc192 Crc32 crc = ComputeChecksum(); in Initialize()
219 Crc32 LiteIndex::ComputeChecksum() { in ComputeChecksum()
231 Crc32 all_crc(header_->CalculateHeaderCrc()); in ComputeChecksum()

12