This folder contains C codes related to the paper "Approximate String 
Searching with AVX2 and AVX-512" by T. Chhabra, S. Ghuman, and J. 
Tarhio. The testing approach is a modification of the Hume-Sunday 
environment.

----------------------------------

KEY ALGORITHMS

n00a: A tuned implementation of Algorithms 2 and 3, m>4, 0<k<6.

n00ad: A modification of n00a for DNA, m>7, 0<k<6.

n00: A tuned implementation of Algorithm 1 for exact string matching, 
m>4.

----------------------------------

COMPILING OF ALGORITHM n00xxx

./mk n00xxx <alpha> <order>

where <alpha> is 16, 32, or 64, and <order> is PLAIN, FIXED, or ENGLISH. 
For example, "./mk n00a 32 ENGLISH" produces n32ea.t.

----------------------------------

USAGE

./n32ea.t [-k err] [-p preps] [-e execs] textfile < patternfile

----------------------------------

OTHER ALGORITHMS FOR THE k MISMATCES PROBLEM

n00ak: A straight-forward implementation of Algorithms 2 and 3, 0<k<m.

n00akb: A modification of n00ak for k=1,2,3; k is processed as a 
compile-time constant.

n00a1r: A varition of n00a for testing the peeling factor, k=1.

ans2b: A reference algorithm*, m<33

naive: A naive algorithm*

---
*) Compilation: ./mk2 algorithm 

----------------------------------

ELEMENTARY TESTING 

File 'text' contains a tiny text; fixed patterns are taken from that.

./test algorithm <repeats> <m> <k>

----------------------------------

NOTES 

It is assumed that the text ends with newline which is ignored.

For m>100, change MAXPAT in inc/def.h.

If the compilation of a 64-byte version is not succesful, check the 
proper compiler options for your AVX-512 compatible processor.
