Computation of the ω-primality and asymptotic ω-primality with applications to numerical semigroups