Knapsack problems resolution using dynamic programming on accelerators