0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Macros | Functions
Checksum.cc File Reference

Implementation of checksum routines. More...

#include "Compat.h"
#include <arpa/inet.h>
#include <zlib.h>
#include "Checksum.h"
Include dependency graph for Checksum.cc:

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...
 

Detailed Description

Implementation of checksum routines.

This file implements the fletcher32 checksum algorithm.

Definition in file Checksum.cc.

Macro Definition Documentation

#define HT_F32_DO1 (   buf,
 
)    sum1 += ((uint16_t)buf[i] << 8) | buf[i + 1]; sum2 += sum1

Definition at line 32 of file Checksum.cc.

#define HT_F32_DO16 (   buf,
 
)    HT_F32_DO8(buf, i); HT_F32_DO8(buf, i + 16);

Definition at line 37 of file Checksum.cc.

#define HT_F32_DO2 (   buf,
 
)    HT_F32_DO1(buf, i); HT_F32_DO1(buf, i + 2);

Definition at line 34 of file Checksum.cc.

#define HT_F32_DO4 (   buf,
 
)    HT_F32_DO2(buf, i); HT_F32_DO2(buf, i + 4);

Definition at line 35 of file Checksum.cc.

#define HT_F32_DO8 (   buf,
 
)    HT_F32_DO4(buf, i); HT_F32_DO4(buf, i + 8);

Definition at line 36 of file Checksum.cc.