Steps to run sequential (CPU) code
gcc -o seq_bloomfilter -std=c99 seq_bloomfilter.c
./seq_bloomfilter inserts.txt lookups.txt
Steps to run parallel (GPU) code
nvcc -o bloomfilter bloomfilter.cu
./bloomfilter inserts.txt lookups.txt
whereinserts.txt
contains the strings to be inserted
lookups.txt
contains the strings to be looked up
filenames are just placeholders and can be renamed
Steps to generate random insert and lookup files
python3 random_input_gen.py -N <num> -P <lookup_percent> -fin <inserts_filename.txt> -flp <lookups_filename.txt>
where
<num>
is the number of random strings to be inserted (default=10000)
<lookup_percent>
is the percentage (0,1) of the generated inserts to be looked up (default=0.2)
The ratio of lookups to inserts is 10:1 so the remaining lookups are randomly generated
<inserts_filename.txt>
is the filename to store the generated inserts (default=inserts.txt)
<lookups_filename.txt>
is the filename to store the generated lookups (default=lookups.txt)
Note: The number of generated strings for insertions and lookups is lesser than the actual value since duplicate strings are filtered out to measure performance of the bloom filter.