File: zfpChecksums.h

package info (click to toggle)
zfp 1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,744 kB
  • sloc: cpp: 20,656; ansic: 18,871; pascal: 1,231; f90: 907; python: 255; makefile: 183; sh: 79; fortran: 70
file content (35 lines) | stat: -rw-r--r-- 705 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef ZFP_CHECKSUMS_H
#define ZFP_CHECKSUMS_H

#include "zfp.h"

typedef enum {
  BLOCK_FULL_TEST = 0,
  BLOCK_PARTIAL_TEST = 1,
  ARRAY_TEST = 2,
} test_type;

typedef enum {
  ORIGINAL_INPUT = 0,
  COMPRESSED_BITSTREAM = 1,
  DECOMPRESSED_ARRAY = 2,
} subject;

// key1 holds data about test type
// key2 holds dimension lengths
typedef struct {
  uint64 key1;
  uint64 key2;
  uint64 checksum;
} checksum_tuples;

void
computeKeyOriginalInput(test_type tt, size_t n[4], uint64* key1, uint64* key2);

void
computeKey(test_type tt, subject sjt, size_t n[4], zfp_mode mode, int miscParam, uint64* key1, uint64* key2);

uint64
getChecksumByKey(int dims, zfp_type type, uint64 key1, uint64 key2);

#endif