1. What Is Metal?
It is a point where our old models must be discarded and a new reality rules.—Vernor Vinge
In 2014, Apple introduced a new low-level GPU programming framework for iOS: Metal. A year later, Metal came to macOS, followed by watchOS and tvOS. Apple devices have two “brains” that can be programmed to create applications: a central processing unit (CPU) and a graphics processing unit (GPU). The GPU is a specialized processor that does floating-point math in parallel very quickly and efficiently. These tasks are expensive on the CPU because they can’t be done in parallel, so various frameworks and APIs have been created to offload these expensive tasks to the processor that is best equipped to do them.
Floating-point math is integral ...