Attempted to separate the snippets of code to small functions and each set of functions have its own file. Also made some improvements by using pools instead of constantly mallocing space.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef HASH_H
|
||||
#define HASH_H
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#define HASH_SIZE 2000003
|
||||
|
||||
/**
|
||||
* @brief Hashes three 128-bit integers into a single unsigned int
|
||||
* @param a The first integer
|
||||
* @param b The second integer
|
||||
* @param c The third integer
|
||||
* @return A hash value for the three integers
|
||||
*/
|
||||
unsigned int hash_three128(uint128_t a, uint128_t b, uint128_t c);
|
||||
|
||||
/**
|
||||
* @brief Sorts a triplet of 128-bit integers in ascending order
|
||||
* @param a Pointer to the first integer
|
||||
* @param b Pointer to the second integer
|
||||
* @param c Pointer to the third integer
|
||||
*/
|
||||
void sort_triplet(int128_t* a, int128_t* b, int128_t* c);
|
||||
|
||||
#endif /* HASH_H */
|
||||
Reference in New Issue
Block a user