If the computer is part of the invention
Then I cannot copy the patent: I'm using a different computer. If the patentable part is "any computer" then it can't be broken by putting it into a bespoke device.
Software algorithms implemented in hardware can be patentable: if you find a way to make a h.264 en/de coder in hardware that is either faster, cheaper, more power efficient or more accurate by exploiting some property of the matter being used, then the method by which that material is used and exploited is patentable. But if someone finds out a way to use some other form of material or uses it in a different way, it's a new patent.
If it had been applicable to a general purpose computer, then it could apply to someone sitting down with a pencil doing the sums. And that is mathematics.
Imagine if "build a better mousetrap" were coined today: it would not work. Someone would have patented "restraining household pests with a device that bars movement of pest until proper disposal can be arranged" and leave the details of what you use to do it hidden.
That is, after all, a business method: if you were running pest disposal business, that would be how to do it.