With patents you're afaik only required to describe the process itself - but not the implementation in code, and especially not optimizations fitted to your architecture.
> The specification must include a written description of the invention and of the manner and process of making and using it, and is required to be in such full, clear, concise, and exact terms as to enable any person skilled in the technological area to which the invention pertains, or with which it is most nearly connected, to make and use the same.
You don't have to provide code, but you have to teach the reader of your patent how to make and use the invention.
In practice, patents are written in specialized legalese that is so far away from actual practice that it's difficult to translate. Additionally, due to treble damages for willful infringement, standard industry practice forbids engineers from reading any patents whatsoever.
The thing is, if you've read a patent, then you (and your employer) now "know of" the patent. If you're later found to infringe the patent, the patent owner can ask for triple damages, since it was wilful infringement. But if you never read it, they can only ask for damages.
Given how many patents are vaguely worded, and how, um, interesting the decisions in patent cases sometimes come out, many companies decide that it isn't worth the risk.
Note well: IANAL. I've just been in companies that had this practice (don't read patents), and I remember why.
Yes, I understand the logic of it, and I have heard of companies that include this requirement. I just doubt that this is anything like a standard industry practice. I've been in the industry for a very long time, and have never once encountered such a restriction, even at very large corporations. I would think if this were close to being a standard practice, I would have encountered it at least once.