21#include <sys/sysinfo.h>
41 static std::chrono::_V2::system_clock::time_point
logTime();
43 static double repTime(
const std::chrono::_V2::system_clock::time_point &start);
58 static std::vector<int>
61 mergeArrays(std::vector<std::vector<std::pair<int,int>>>* input,
int arr_len,
62 std::vector<std::vector<std::pair<int,int>>> & result);
63 static ui hval(
const std::pair<ui, ui> &hf,
ui &word);
66 static double shrinkBottomk(std::vector<std::vector<ui>>& bottom_ks,
double ratio);
68 static bool bottomKJaccard(
const std::vector<T>& A,
const std::vector<T>& B,
double& thres);
84 static bool strLessT(
const std::string &s1,
const std::string &s2);
85 static uint64_t
strHash(
const std::string &str,
int stPos,
int len);
86 static int min(
int a,
int b,
int c) {
87 return (a <= b && a <= c) ? a : (b <= c ? b : c);
89 static int min(
int *arr) {
90 return arr[std::min_element(arr, arr + 3) - arr];
92 static int max(
int a,
int b,
int c);
93 static char min(
char a,
char b,
char c);
94 static unsigned min(
unsigned a,
unsigned b,
unsigned c);
static void mergeArrays(std::vector< std::vector< std::pair< int, int > > > *input, int arr_len, std::vector< std::vector< std::pair< int, int > > > &result)
Definition joinutil.cc:163
static int getHowManyThreads()
Definition joinutil.cc:119
static double shrinkBottomk(std::vector< std::vector< ui > > &bottom_ks, double ratio)
Definition joinutil.cc:191
static bool bottomKJaccard(const std::vector< T > &A, const std::vector< T > &B, double &thres)
Definition joinutil.cc:205
SetJoinParallelUtil(SetJoinParallelUtil &&other)=delete
static std::vector< int > getUniqueInts(const std::vector< std::pair< int, int > > &pairs)
Definition joinutil.cc:148
static ui hval(const std::pair< ui, ui > &hf, ui &word)
Definition joinutil.cc:173
SetJoinParallelUtil()=default
~SetJoinParallelUtil()=default
static void printHowManyThreads()
Definition joinutil.cc:133
SetJoinParallelUtil(const SetJoinParallelUtil &other)=delete
static void generateHashFunc(ui seed, std::pair< ui, ui > &hf)
Definition joinutil.cc:179
static void printMemory()
Definition joinutil.cc:13
static void processMemUsage(double &vm_usage, double &resident_set)
Definition joinutil.cc:66
SetJoinUtil(const SetJoinUtil &other)=delete
static double repTime(const std::chrono::_V2::system_clock::time_point &start)
Definition joinutil.cc:111
SetJoinUtil(SetJoinUtil &&other)=delete
static std::chrono::_V2::system_clock::time_point logTime()
Definition joinutil.cc:105
static int min(int a, int b, int c)
Definition joinutil.h:86
static uint64_t strHash(const std::string &str, int stPos, int len)
Definition joinutil.cc:252
static int max(int a, int b, int c)
Definition joinutil.cc:261
static bool PIndexLess(const PIndex &p1, const PIndex &p2)
Definition joinutil.cc:276
StringJoinUtil(const StringJoinUtil &other)=delete
~StringJoinUtil()=default
static bool strLessT(const std::string &s1, const std::string &s2)
Definition joinutil.cc:243
static int min(int *arr)
Definition joinutil.h:89
StringJoinUtil(StringJoinUtil &&other)=delete
unsigned int ui
Definition type.h:8