Implemented longest prefix index array pre-calculation.
Fixed full-flow testing for each algorithm.
Separated kernel initialization and execution to remove redundant re-initializations with same parameters.