making cuda work with vs2012
updating flex filter and pwdist functions with opencv references