smithwaterman public domain smith-waterman (& some of them have needleman-wunsch) algorithm scripts which can be used as a module in your own applications. Check test/README.md and whether the codes are working propery. (I'm not familiar with GPU programming.)