File: defs.h

package info (click to toggle)
haskell-hashtables 1.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 420 kB
  • sloc: haskell: 4,662; ansic: 590; makefile: 14; sh: 4
file content (35 lines) | stat: -rw-r--r-- 1,157 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 HASHTABLES_DEFS_H
#define HASHTABLES_DEFS_H

#include <stdint.h>
#include <strings.h>

typedef uintptr_t full_hash_t;
typedef uint16_t small_hash_t;

void prefetch_cacheline_write(small_hash_t* line, int start);
void prefetch_cacheline_read(small_hash_t* line, int start);

int forward_search_2(small_hash_t* array,
                     int start,
                     int end,
                     small_hash_t x1,
                     small_hash_t x2);
int forward_search_3(small_hash_t* array,
                     int start,
                     int end,
                     small_hash_t x1,
                     small_hash_t x2,
                     small_hash_t x3);

int line_search(small_hash_t* array, int start, small_hash_t x1);
int line_search_2(small_hash_t* array, int start, small_hash_t x1,
                  small_hash_t x2);
int line_search_3(small_hash_t* array, int start, small_hash_t x1,
                  small_hash_t x2, small_hash_t x3);
void suicide(volatile int* check, int i);

void CHECK(int actual, int expected, char* what);
void check_impl_specific(int* num_tests, int* num_errors);

#endif  /* HASHTABLES_DEFS_H */