Implementation of checksum routines. More...
Go to the source code of this file.
Namespaces | |
Hypertable | |
Hypertable definitions | |
Macros | |
#define | HT_F32_DO1(buf, i) sum1 += ((uint16_t)buf[i] << 8) | buf[i + 1]; sum2 += sum1 |
#define | HT_F32_DO2(buf, i) HT_F32_DO1(buf, i); HT_F32_DO1(buf, i + 2); |
#define | HT_F32_DO4(buf, i) HT_F32_DO2(buf, i); HT_F32_DO2(buf, i + 4); |
#define | HT_F32_DO8(buf, i) HT_F32_DO4(buf, i); HT_F32_DO4(buf, i + 8); |
#define | HT_F32_DO16(buf, i) HT_F32_DO8(buf, i); HT_F32_DO8(buf, i + 16); |
Functions | |
uint32_t | Hypertable::fletcher32 (const void *data, size_t len) |
Compute fletcher32 checksum for arbitary data. More... | |
Implementation of checksum routines.
This file implements the fletcher32 checksum algorithm.
Definition in file Checksum.cc.
#define HT_F32_DO1 | ( | buf, | |
i | |||
) | sum1 += ((uint16_t)buf[i] << 8) | buf[i + 1]; sum2 += sum1 |
Definition at line 32 of file Checksum.cc.
#define HT_F32_DO16 | ( | buf, | |
i | |||
) | HT_F32_DO8(buf, i); HT_F32_DO8(buf, i + 16); |
Definition at line 37 of file Checksum.cc.
#define HT_F32_DO2 | ( | buf, | |
i | |||
) | HT_F32_DO1(buf, i); HT_F32_DO1(buf, i + 2); |
Definition at line 34 of file Checksum.cc.
#define HT_F32_DO4 | ( | buf, | |
i | |||
) | HT_F32_DO2(buf, i); HT_F32_DO2(buf, i + 4); |
Definition at line 35 of file Checksum.cc.
#define HT_F32_DO8 | ( | buf, | |
i | |||
) | HT_F32_DO4(buf, i); HT_F32_DO4(buf, i + 8); |
Definition at line 36 of file Checksum.cc.